diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-29 00:42:03 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 00:42:03 +0900 |
commit | d53074b9ae78932ab97d6cd428557c6ec0b96a48 (patch) | |
tree | ea86d39d7fa38325f4dc893189355ddc1a8e4f3a | |
parent | 110c1d6e1f68be65dcbc83aa5698d373e71ac357 (diff) | |
download | OneConfig-d53074b9ae78932ab97d6cd428557c6ec0b96a48.tar.gz OneConfig-d53074b9ae78932ab97d6cd428557c6ec0b96a48.tar.bz2 OneConfig-d53074b9ae78932ab97d6cd428557c6ec0b96a48.zip |
fix: fix mixin being included in dev jar (#76)
-rw-r--r-- | versions/build.gradle.kts | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/versions/build.gradle.kts b/versions/build.gradle.kts index 87ce21f..da41fe0 100644 --- a/versions/build.gradle.kts +++ b/versions/build.gradle.kts @@ -1,7 +1,6 @@ import gg.essential.gradle.util.RelocationTransform.Companion.registerRelocationAttribute import gg.essential.gradle.util.noServerRunConfigs import net.fabricmc.loom.task.RemapSourcesJarTask -import org.jetbrains.kotlin.gradle.utils.extendsFrom import java.text.SimpleDateFormat @@ -115,7 +114,9 @@ val shade: Configuration by configurations.creating { configurations.api.get().extendsFrom(this) } -val shadeNoPom2: Configuration by configurations.creating +val shadeNoPom: Configuration by configurations.creating + +val shadeNoJar: Configuration by configurations.creating sourceSets { main { @@ -155,7 +156,9 @@ dependencies { include("org.jetbrains.kotlinx:atomicfu-jvm:$atomicfuVersion") if (platform.isLegacyForge) { - include("org.spongepowered:mixin:0.7.11-SNAPSHOT", pom = false, transitive = false) + implementationNoPom(shadeNoJar("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + isTransitive = false + }) } shadeProject(project(":")) { isTransitive = false @@ -232,7 +235,7 @@ tasks { val shadowJar = named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") { archiveClassifier.set("full-dev") - configurations = listOf(shade, shadeNoPom2, shadeProject, shadeRelocated) + configurations = listOf(shade, shadeNoPom, shadeNoJar, shadeProject, shadeRelocated) duplicatesStrategy = DuplicatesStrategy.EXCLUDE dependsOn(jar) } @@ -247,8 +250,8 @@ tasks { } jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE - dependsOn(shadeNoPom2, shadeProject, shadeRelocated) - from(ArrayList<File>().run { addAll(shadeNoPom2); addAll(shadeProject); addAll(shadeRelocated); this } + dependsOn(shadeNoPom, shadeProject, shadeRelocated) + from(ArrayList<File>().run { addAll(shadeNoPom); addAll(shadeProject); addAll(shadeRelocated); this } .map { if (it.isDirectory) it else zipTree(it) }) manifest { attributes( @@ -375,7 +378,7 @@ fun DependencyHandlerScope.include(dependency: Any, pom: Boolean = true, mod: Bo if (pom) { shade(dependency) } else { - shadeNoPom2(dependency) + shadeNoPom(dependency) implementationNoPom(dependency) } } else { @@ -405,7 +408,7 @@ fun DependencyHandlerScope.include(dependency: ModuleDependency, pom: Boolean = if (pom) { shade(dependency) { isTransitive = transitive } } else { - shadeNoPom2(dependency) { isTransitive = transitive } + shadeNoPom(dependency) { isTransitive = transitive } implementationNoPom(dependency) { isTransitive = transitive } } } @@ -436,7 +439,7 @@ fun DependencyHandlerScope.include(dependency: String, pom: Boolean = true, mod: if (pom) { shade(dependency) { isTransitive = transitive } } else { - shadeNoPom2(dependency) { isTransitive = transitive } + shadeNoPom(dependency) { isTransitive = transitive } implementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } } |