2023-03-13 02:09:09 -07:00
|
|
|
/*
|
|
|
|
* 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'
|
2023-06-21 23:55:17 -07:00
|
|
|
id 'idea'
|
2023-08-02 00:58:34 -07:00
|
|
|
id 'eclipse'
|
2023-04-20 02:35:58 -07:00
|
|
|
id 'maven-publish'
|
2023-03-13 02:09:09 -07:00
|
|
|
}
|
|
|
|
|
2023-04-20 18:52:50 -07:00
|
|
|
group = "dev.zontreck"
|
2023-04-20 19:00:54 -07:00
|
|
|
archivesBaseName = "LibAC"
|
2023-08-02 00:58:34 -07:00
|
|
|
|
|
|
|
java {
|
2023-12-04 23:14:41 -07:00
|
|
|
toolchain.languageVersion = JavaLanguageVersion.of(8)
|
2023-08-02 00:58:34 -07:00
|
|
|
withSourcesJar()
|
2023-11-19 05:08:53 -07:00
|
|
|
withJavadocJar()
|
2023-08-02 00:58:34 -07:00
|
|
|
}
|
2023-04-20 18:52:50 -07:00
|
|
|
|
2023-05-08 16:10:37 -07:00
|
|
|
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]
|
|
|
|
}
|
2023-05-08 16:19:09 -07:00
|
|
|
version = determinePatchVersion()
|
|
|
|
version = "${apiVer}.${version}"
|
2023-03-13 02:09:09 -07:00
|
|
|
repositories {
|
|
|
|
// Use Maven Central for resolving dependencies.
|
2023-07-30 13:18:03 -07:00
|
|
|
// mavenCentral()
|
|
|
|
maven {
|
2024-01-07 14:45:24 -07:00
|
|
|
url = "https://maven.zontreck.com/repository/internal"
|
2023-10-15 06:08:30 -07:00
|
|
|
name = "Aria's Creations Caches"
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
2024-01-07 14:45:24 -07:00
|
|
|
url = "https://maven.zontreck.com/repository/zontreck"
|
2023-07-30 13:18:03 -07:00
|
|
|
name = "Aria's Creations"
|
|
|
|
}
|
2023-03-13 02:09:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
2023-12-05 11:31:58 -07:00
|
|
|
|
2023-10-15 06:08:30 -07:00
|
|
|
implementation "dev.zontreck:EventsBus:${Bus_API}.${Bus_Patch}"
|
|
|
|
api "dev.zontreck:EventsBus:${Bus_API}.${Bus_Patch}:sources"
|
2023-12-05 11:31:58 -07:00
|
|
|
|
|
|
|
testImplementation platform('org.junit:junit-bom:5.9.1')
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
2023-03-13 02:09:09 -07:00
|
|
|
}
|
2023-04-20 02:35:58 -07:00
|
|
|
|
2023-06-21 22:41:30 -07:00
|
|
|
def MAVEN_PASSWORD_PROPERTY = "AriasCreationsMavenPassword"
|
|
|
|
|
2023-04-20 02:35:58 -07:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
2023-08-02 00:58:34 -07:00
|
|
|
artifact sourcesJar
|
2023-04-20 02:35:58 -07:00
|
|
|
artifact jar
|
2023-11-19 05:08:53 -07:00
|
|
|
artifact javadocJar
|
2023-04-20 02:35:58 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
maven {
|
2024-01-07 14:45:24 -07:00
|
|
|
url = "https://maven.zontreck.com/repository/zontreck"
|
2023-06-21 22:41:30 -07:00
|
|
|
name = "ariascreations"
|
|
|
|
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
|
|
|
|
credentials {
|
|
|
|
username = "admin"
|
|
|
|
password = project.findProperty(MAVEN_PASSWORD_PROPERTY)
|
|
|
|
}
|
|
|
|
}
|
2023-04-20 02:35:58 -07:00
|
|
|
}
|
|
|
|
}
|
2023-08-02 00:17:44 -07:00
|
|
|
}
|
2023-12-05 11:31:58 -07:00
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|