Skip to content

Commit 3d3124d

Browse files
hotfix: revert shadow plugin upgrade (#3298)
Revert "Update dependency com.gradleup.shadow:shadow-gradle-plugin to v9 (#3281)" This reverts commit a6da595.
1 parent e94a3b5 commit 3d3124d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ val properties = Properties().also { props ->
2323
dependencies {
2424
implementation(gradleApi())
2525
implementation("org.ajoberstar.grgit:grgit-gradle:5.3.2")
26-
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.1.0")
26+
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.9")
2727
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-SNAPSHOT")
2828
constraints {
2929
val asmVersion = "[9.7,)"

buildSrc/src/main/kotlin/LibsConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fun Project.applyLibrariesConfiguration() {
4545
)
4646

4747
tasks.register<ShadowJar>("jar") {
48-
configurations.set(listOf(project.configurations["shade"]))
48+
configurations = listOf(project.configurations["shade"])
4949
archiveClassifier.set("")
5050

5151
dependencies {

buildSrc/src/main/kotlin/PlatformConfig.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
21
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
32
import org.gradle.api.Project
43
import org.gradle.api.component.AdhocComponentWithVariants
@@ -36,10 +35,6 @@ fun Project.applyPlatformAndCoreConfiguration() {
3635
ext["internalVersion"] = "$version"
3736
}
3837

39-
configure<ShadowExtension> {
40-
addShadowVariantIntoJavaComponent.set(false)
41-
}
42-
4338
configure<JavaPluginExtension> {
4439
disableAutoTargetJvm()
4540
withJavadocJar()
@@ -50,6 +45,9 @@ fun Project.applyPlatformAndCoreConfiguration() {
5045
}
5146

5247
val javaComponent = components["java"] as AdhocComponentWithVariants
48+
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
49+
skip()
50+
}
5351

5452
val publishingExtension = the<PublishingExtension>()
5553

0 commit comments

Comments
 (0)