Skip to content

Commit

Permalink
Update shadow plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed May 13, 2021
1 parent 81e6b00 commit 4f206d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Expand Up @@ -12,7 +12,7 @@ repositories {
dependencies {
implementation(kotlin("gradle-plugin"))
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:5.3.0")
implementation("com.github.jengelman.gradle.plugins:shadow:6.1.0")
implementation("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0")
implementation("org.gradle:test-retry-gradle-plugin:1.2.1")
compileOnly("com.gradle.enterprise:test-distribution-gradle-plugin:2.0.3")
}
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/java-library-conventions.gradle.kts
@@ -1,3 +1,4 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.PathSensitivity.RELATIVE

plugins {
Expand Down Expand Up @@ -163,7 +164,7 @@ tasks.withType<Jar>().configureEach {
into("META-INF")
}
val suffix = archiveClassifier.getOrElse("")
if (suffix.isBlank() || suffix == "all") { // "all" is used by shadow plugin
if (suffix.isBlank() || this is ShadowJar) {
dependsOn(allMainClasses, compileModule)
from("$moduleOutputDir/$javaModuleName") {
include("module-info.class")
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/shadow-conventions.gradle.kts
Expand Up @@ -47,6 +47,7 @@ tasks {
shadowJar {
configurations = listOf(shadowed)
exclude("META-INF/maven/**")
excludes.remove("module-info.class")
archiveClassifier.set("")
}
jar {
Expand Down

0 comments on commit 4f206d3

Please sign in to comment.