Skip to content

Commit

Permalink
Merge pull request #675 from mjulianotq/674
Browse files Browse the repository at this point in the history
Moved graldeApi() exclusion to the task configuration.
  • Loading branch information
johnrengelman authored Aug 1, 2021
2 parents 63328d7 + 2f94a25 commit 1f86896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class ShadowJavaPlugin implements Plugin<Project> {
shadow.configurations = [project.configurations.findByName('runtimeClasspath') ?
project.configurations.runtimeClasspath : project.configurations.runtime]
shadow.exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class')
shadow.dependencies {
exclude(dependency(project.dependencies.gradleApi()))
}
}
project.artifacts.add(ShadowBasePlugin.CONFIGURATION_NAME, project.tasks.named(SHADOW_JAR_TASK_NAME))
configureShadowUpload()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ class ShadowPlugin implements Plugin<Project> {
}
}
}

afterEvaluate {
plugins.withId('java-gradle-plugin') {
// needed to prevent inclusion of gradle-api into shadow JAR
configurations.named(JavaPlugin.API_CONFIGURATION_NAME) {
dependencies.remove(project.dependencies.gradleApi())
}
}
}
}
}
}

0 comments on commit 1f86896

Please sign in to comment.