Skip to content

Commit

Permalink
misc cleanup + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolij committed May 2, 2024
1 parent 5413ca0 commit e355618
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ tasks.jar {
}

val sourcesJar = tasks.register<Jar>("sourcesJar") {
dependsOn(compressJar)
group = "build"

archiveClassifier = "sources"
Expand All @@ -318,8 +317,12 @@ val sourcesJar = tasks.register<Jar>("sourcesJar") {
rename { "${it}_${"mod_id"()}" }
}

from(compressJar.get().mappingsFile) {
rename { "mapping.txt" }
if (releaseChannel.proguard) {
dependsOn(compressJar)

from(compressJar.get().mappingsFile) {
rename { "mappings.txt" }
}
}

listOf(
Expand Down Expand Up @@ -353,7 +356,7 @@ tasks.shadowJar {
dependsOn(apiJar)
from(zipTree(apiJar.get().archiveFile.get())) { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }

uniminedImpls.map { project(it).tasks.withType<RemapJarTask>() }.flatten().forEach { remapJar ->
uniminedImpls.flatMap { project(it).tasks.withType<RemapJarTask>() }.forEach { remapJar ->
dependsOn(remapJar)
from(zipTree(remapJar.archiveFile.get())) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand Down Expand Up @@ -434,7 +437,6 @@ afterEvaluate {
publishMods {
file = compressJar.get().outputJar
additionalFiles.from(sourcesJar.get().archiveFile)
// TODO: add proguard mappings to `additionalFiles`
type = releaseChannel.releaseType ?: ALPHA
displayName = Zume.version
version = Zume.version
Expand Down

0 comments on commit e355618

Please sign in to comment.