Add sources.jar to repo-publishing

This commit is contained in:
Lukas Rieger (Blue) 2024-06-17 23:48:31 +02:00
parent dbd7414542
commit f9415468bf
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
2 changed files with 9 additions and 9 deletions

View File

@ -17,6 +17,7 @@ val javaTarget = 16
java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
withSourcesJar()
}
repositories {
@ -96,9 +97,8 @@ tasks.register("zipWebapp", type = Zip::class) {
}
//always update the zip before build
tasks.processResources {
dependsOn("zipWebapp")
}
tasks.processResources { dependsOn("zipWebapp") }
tasks.getByName("sourcesJar") { dependsOn("zipWebapp") }
publishing {
repositories {

View File

@ -39,9 +39,9 @@ val commits = "git rev-list --count $lastTag..HEAD".runCommand()
println("Git hash: $gitHash" + if (clean) "" else " (dirty)")
group = "de.bluecolored.bluemap"
version = lastVersion +
(if (commits == "0") "" else "-$commits") +
(if (clean) "" else "-dirty")
version = lastVersion //+
//(if (commits == "0") "" else "-$commits") +
//(if (clean) "" else "-dirty")
System.setProperty("bluemap.version", version.toString())
System.setProperty("bluemap.lastVersion", lastVersion)
@ -51,6 +51,7 @@ val javaTarget = 16
java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
withSourcesJar()
}
repositories {
@ -127,9 +128,8 @@ tasks.register("zipResourceExtensions", type = Zip::class) {
}
//always update the zip before build
tasks.processResources {
dependsOn("zipResourceExtensions")
}
tasks.processResources { dependsOn("zipResourceExtensions") }
tasks.getByName("sourcesJar") { dependsOn("zipResourceExtensions") }
publishing {
repositories {