diff options
Diffstat (limited to 'forge/build.gradle.kts')
-rw-r--r-- | forge/build.gradle.kts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 88e1b5f..4c822d3 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -1,4 +1,6 @@ +import org.gradle.api.component.AdhocComponentWithVariants import org.gradle.jvm.tasks.Jar +import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.libs plugins { @@ -113,9 +115,11 @@ tasks { } } -components["java"].withGroovyBuilder { - "withVariantsFromConfiguration"(configurations["shadowRuntimeElements"]) { - "skip"() +components["java"].run { + if (this is AdhocComponentWithVariants) { + withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { + skip() + } } } |