Skip to content

Commit a6da595

Browse files
Update dependency com.gradleup.shadow:shadow-gradle-plugin to v9 (#3281)
* Update dependency com.gradleup.shadow:shadow-gradle-plugin to v9 * fix: address shadow changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pierre Maurice Schwang <[email protected]>
1 parent 78db5f8 commit a6da595

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
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:8.3.9")
26+
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.1.0")
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 = listOf(project.configurations["shade"])
48+
configurations.set(listOf(project.configurations["shade"]))
4949
archiveClassifier.set("")
5050

5151
dependencies {

buildSrc/src/main/kotlin/PlatformConfig.kt

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

39+
configure<ShadowExtension> {
40+
addShadowVariantIntoJavaComponent.set(false)
41+
}
42+
3843
configure<JavaPluginExtension> {
3944
disableAutoTargetJvm()
4045
withJavadocJar()
@@ -45,9 +50,6 @@ fun Project.applyPlatformAndCoreConfiguration() {
4550
}
4651

4752
val javaComponent = components["java"] as AdhocComponentWithVariants
48-
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
49-
skip()
50-
}
5153

5254
val publishingExtension = the<PublishingExtension>()
5355

0 commit comments

Comments
 (0)