diff --git a/libraries/config/VERSION b/libraries/config/VERSION new file mode 100644 index 00000000..afaf360d --- /dev/null +++ b/libraries/config/VERSION @@ -0,0 +1 @@ +1.0.0 \ No newline at end of file diff --git a/libraries/config/build.gradle.kts b/libraries/config/build.gradle.kts index 5d86d363..63db1675 100644 --- a/libraries/config/build.gradle.kts +++ b/libraries/config/build.gradle.kts @@ -24,6 +24,38 @@ dependencies { } tasks { + publishing { + repositories { + maven { + name = "fancyinnovationsReleases" + url = uri("https://repo.fancyinnovations.com/releases") + credentials(PasswordCredentials::class) + authentication { + isAllowInsecureProtocol = true + create("basic") + } + } + + maven { + name = "fancyinnovationsSnapshots" + url = uri("https://repo.fancyinnovations.com/snapshots") + credentials(PasswordCredentials::class) + authentication { + isAllowInsecureProtocol = true + create("basic") + } + } + } + publications { + create("maven") { + groupId = "de.oliver" + artifactId = "config" + version = getCFGVersion() + from(project.components["java"]) + } + } + } + compileJava { options.encoding = Charsets.UTF_8.name() options.release.set(17) //TODO change to 21, once 1.19.4 support is dropped @@ -49,3 +81,7 @@ tasks { java { toolchain.languageVersion.set(JavaLanguageVersion.of(17)) //TODO change to 21, once 1.19.4 support is dropped } + +fun getCFGVersion(): String { + return file("VERSION").readText() +} \ No newline at end of file