Skip to content

Commit

Permalink
fix: package manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
ExerciseBook committed Mar 28, 2023
1 parent 5a239b2 commit 13d9dc2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions platforms/forge-1.18.2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.ManifestAppenderTransformer

/*
* This file is part of UnifiedMetrics.
*
Expand Down Expand Up @@ -26,11 +28,13 @@ java {
targetCompatibility = JavaVersion.VERSION_17
}

val mixinConfigName = "unifiedmetrics.mixins.json"

loom {
silentMojangMappingsLicense()

forge {
mixinConfigs("unifiedmetrics.mixins.json")
mixinConfigs(mixinConfigName)
}

mixin {
Expand Down Expand Up @@ -89,8 +93,8 @@ tasks {
archiveClassifier.set("")
dependsOn(remapJar)
mustRunAfter(remapJar)
from(zipTree(remapJar.get().archiveFile))
duplicatesStrategy = DuplicatesStrategy.WARN
from(zipTree(remapJar.get().archiveFile.get()))
duplicatesStrategy = DuplicatesStrategy.FAIL
configurations = listOf(project.configurations.shadow.get())
relocate("retrofit2", "dev.cubxity.plugins.metrics.libs.retrofit2")
relocate("com.charleskorn", "dev.cubxity.plugins.metrics.libs.com.charleskorn")
Expand All @@ -105,6 +109,9 @@ tasks {
relocate("org.apache.common", "dev.cubxity.plugins.metrics.libs.org.apache.common")
relocate("org.reactivestreams", "dev.cubxity.plugins.metrics.libs.org.reactivestreams")
exclude("javax/**", "kotlin/**", "kotlinx/**", "org/jetbrains/**", "org/intellij/**")
manifest {
this.attributes["MixinConfigs"] = mixinConfigName
}
}

processResources {
Expand Down

0 comments on commit 13d9dc2

Please sign in to comment.