config: Add VERSION file and configure publishing to maven repo

This commit is contained in:
Oliver
2025-11-20 12:29:25 +01:00
parent 0d8665e5e5
commit 6c1ff8a77a
2 changed files with 37 additions and 0 deletions

1
libraries/config/VERSION Normal file
View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -24,6 +24,38 @@ dependencies {
} }
tasks { tasks {
publishing {
repositories {
maven {
name = "fancyinnovationsReleases"
url = uri("https://repo.fancyinnovations.com/releases")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
maven {
name = "fancyinnovationsSnapshots"
url = uri("https://repo.fancyinnovations.com/snapshots")
credentials(PasswordCredentials::class)
authentication {
isAllowInsecureProtocol = true
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "de.oliver"
artifactId = "config"
version = getCFGVersion()
from(project.components["java"])
}
}
}
compileJava { compileJava {
options.encoding = Charsets.UTF_8.name() options.encoding = Charsets.UTF_8.name()
options.release.set(17) //TODO change to 21, once 1.19.4 support is dropped options.release.set(17) //TODO change to 21, once 1.19.4 support is dropped
@@ -49,3 +81,7 @@ tasks {
java { java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) //TODO change to 21, once 1.19.4 support is dropped toolchain.languageVersion.set(JavaLanguageVersion.of(17)) //TODO change to 21, once 1.19.4 support is dropped
} }
fun getCFGVersion(): String {
return file("VERSION").readText()
}