LibAC/build.gradle

78 lines
1.5 KiB
Groovy
Raw Normal View History

2023-03-13 02:09:09 -07:00
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"
archivesBaseName = "LibAC"
2023-08-02 00:58:34 -07:00
2024-02-06 20:55:42 -07:00
2023-08-02 00:58:34 -07:00
java {
2024-09-06 03:19:25 -07:00
sourceCompatibility = JavaLanguageVersion.of(8)
toolchain.languageVersion = JavaLanguageVersion.of(8)
2023-08-02 00:58:34 -07:00
withSourcesJar()
withJavadocJar()
2023-08-02 00:58:34 -07:00
}
2023-04-20 18:52:50 -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]
}
2024-02-10 16:35:01 -07:00
2023-05-08 16:19:09 -07:00
version = determinePatchVersion()
version = "${apiVer}.${version}"
2024-02-10 16:35:01 -07:00
2023-03-13 02:09:09 -07:00
repositories {
// Use Maven Central for resolving dependencies.
2023-07-30 13:18:03 -07:00
// mavenCentral()
2023-03-13 02:09:09 -07:00
}
dependencies {
}
2023-04-20 02:35:58 -07:00
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
2024-02-10 16:35:01 -07:00
artifact sourcesJar
artifact javadocJar
2023-04-20 02:35:58 -07:00
}
}
repositories {
maven {
url = "https://git.zontreck.com/api/packages/AriasCreations/maven"
2023-06-21 22:41:30 -07:00
name = "ariascreations"
def ENV = System.getenv()
2024-09-06 03:16:59 -07:00
credentials {
username = ENV.MVN_USER
password = ENV.ACMVN
2023-06-21 22:41:30 -07:00
}
2023-04-20 02:35:58 -07:00
}
}
}
test {
useJUnitPlatform()
}
2024-02-06 20:59:16 -07:00
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
options.release = 8
2024-02-06 20:59:16 -07:00
}