Skip to content

Commit

Permalink
re-add the code that removes gradleApi from the api configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
John Engelman committed Mar 20, 2023
1 parent 33520bc commit d530cff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ tasks.withType(Test).configureEach {
)
}

// Remove the gradleApi so it isn't merged into the jar file.
// This is required because 'java-gradle-plugin' adds gradleApi() to the 'api' configuration.
// See https://github.com/gradle/gradle/blob/master/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/JavaGradlePluginPlugin.java#L162
configurations.named(JavaPlugin.API_CONFIGURATION_NAME) {
dependencies.remove(project.dependencies.gradleApi())
}

tasks.named('shadowJar', ShadowJar) {
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
Expand Down

0 comments on commit d530cff

Please sign in to comment.