91 lines
2.2 KiB
Groovy
91 lines
2.2 KiB
Groovy
/*
|
|
* This file was generated by the Gradle 'init' task.
|
|
*
|
|
* This generated file contains a sample Java library project to get you started.
|
|
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
|
|
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
|
|
*/
|
|
|
|
plugins {
|
|
// Apply the java-library plugin for API and implementation separation.
|
|
id 'java-library'
|
|
id 'idea'
|
|
id 'eclipse'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
group = "dev.zontreck"
|
|
archivesBaseName = "Registry"
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
def determinePatchVersion = {
|
|
// get the name of the last tag
|
|
def tagInfo = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine 'git', 'describe', '--tags'
|
|
standardOutput = tagInfo
|
|
}
|
|
tagInfo = tagInfo.toString()
|
|
|
|
if (!tagInfo.contains('-')) {
|
|
return 0
|
|
}
|
|
return tagInfo.split("-")[1]
|
|
}
|
|
version = determinePatchVersion()
|
|
version = "${apiVer}.${version}"
|
|
repositories {
|
|
// Use Maven Central for resolving dependencies.
|
|
// mavenCentral()
|
|
maven {
|
|
url = "https://maven.zontreck.com/repository/internal"
|
|
name = "Aria's Creations Caches"
|
|
}
|
|
|
|
maven {
|
|
url = "https://maven.zontreck.com/repository/zontreck"
|
|
name = "Aria's Creations"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation "dev.zontreck:EventsBus:${Bus_API}.${Bus_Patch}"
|
|
api "dev.zontreck:EventsBus:${Bus_API}.${Bus_Patch}:sources"
|
|
}
|
|
|
|
def MAVEN_PASSWORD_PROPERTY = "AriasCreationsMavenPassword"
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact jar
|
|
artifact sourcesJar
|
|
artifact javadocJar
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url = "https://maven.zontreck.com/repository/zontreck"
|
|
name = "ariascreations"
|
|
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
|
|
credentials {
|
|
username = "admin"
|
|
password = project.findProperty(MAVEN_PASSWORD_PROPERTY)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
compileJava.finalizedBy("sourcesJar")
|
|
artifacts {
|
|
archives jar
|
|
archives sourcesJar
|
|
}
|