diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-27 23:51:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 23:51:58 +0900 |
commit | 44e57264c0072ee585a3b3373a483d39efd1f71c (patch) | |
tree | 875fdfb90bd22afec2657399fe26fb6275e1404d /versions/build.gradle.kts | |
parent | 78407ee8f0eb5f7786042e82108a755319ec8ced (diff) | |
download | OneConfig-44e57264c0072ee585a3b3373a483d39efd1f71c.tar.gz OneConfig-44e57264c0072ee585a3b3373a483d39efd1f71c.tar.bz2 OneConfig-44e57264c0072ee585a3b3373a483d39efd1f71c.zip |
fix mixins once and for all (#75)
Diffstat (limited to 'versions/build.gradle.kts')
-rw-r--r-- | versions/build.gradle.kts | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/versions/build.gradle.kts b/versions/build.gradle.kts index 87c6b64..87ce21f 100644 --- a/versions/build.gradle.kts +++ b/versions/build.gradle.kts @@ -1,6 +1,7 @@ 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 @@ -92,6 +93,16 @@ val relocated = registerRelocationAttribute("relocate") { remapStringsIn("com.github.benmanes.caffeine.cache.NodeFactory") } +val implementationNoPom: Configuration by configurations.creating { + configurations.named(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME) { extendsFrom(this@creating) } + configurations.named(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME) { extendsFrom(this@creating) } +} + +val modImplementationNoPom: Configuration by configurations.creating { + configurations.modImplementation.get().extendsFrom(this) + configurations.modRuntime.get().extendsFrom(this) +} + val shadeProject: Configuration by configurations.creating { attributes { attribute(relocatedCommonProject, false) } } @@ -365,8 +376,7 @@ fun DependencyHandlerScope.include(dependency: Any, pom: Boolean = true, mod: Bo shade(dependency) } else { shadeNoPom2(dependency) - compileOnly(dependency) - runtimeOnly(dependency) + implementationNoPom(dependency) } } else { if (pom) { @@ -377,11 +387,9 @@ fun DependencyHandlerScope.include(dependency: Any, pom: Boolean = true, mod: Bo } } else { if (mod) { - modCompileOnly(dependency) - modRuntimeOnly(dependency) + modImplementationNoPom(dependency) } else { - compileOnly(dependency) - runtimeOnly(dependency) + implementationNoPom(dependency) } } "include"(dependency) @@ -392,15 +400,13 @@ fun DependencyHandlerScope.include(dependency: ModuleDependency, pom: Boolean = if (platform.isForge) { if (relocate) { shadeRelocated(dependency) { isTransitive = transitive } - compileOnly(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } - runtimeOnly(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } + implementationNoPom(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } } else { if (pom) { shade(dependency) { isTransitive = transitive } } else { shadeNoPom2(dependency) { isTransitive = transitive } - compileOnly(dependency) { isTransitive = transitive } - runtimeOnly(dependency) { isTransitive = transitive } + implementationNoPom(dependency) { isTransitive = transitive } } } } else { @@ -412,11 +418,9 @@ fun DependencyHandlerScope.include(dependency: ModuleDependency, pom: Boolean = } } else { if (mod) { - modCompileOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } - modRuntimeOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } + modImplementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } else { - compileOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } - runtimeOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } + implementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } } "include"(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } @@ -427,15 +431,13 @@ fun DependencyHandlerScope.include(dependency: String, pom: Boolean = true, mod: if (platform.isForge) { if (relocate) { shadeRelocated(dependency) { isTransitive = transitive } - compileOnly(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } - runtimeOnly(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } + implementationNoPom(dependency) { isTransitive = transitive; attributes { attribute(relocated, true) } } } else { if (pom) { shade(dependency) { isTransitive = transitive } } else { shadeNoPom2(dependency) { isTransitive = transitive } - compileOnly(dependency) { isTransitive = transitive } - runtimeOnly(dependency) { isTransitive = transitive } + implementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } } } else { @@ -447,11 +449,9 @@ fun DependencyHandlerScope.include(dependency: String, pom: Boolean = true, mod: } } else { if (mod) { - modCompileOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } - modRuntimeOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } + modImplementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } else { - compileOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } - runtimeOnly(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } + implementationNoPom(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } } } "include"(dependency) { isTransitive = transitive; if (relocate) attributes { attribute(relocated, true) } } |