Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to new Gradle Shadow plugin #2618

Open
wants to merge 2 commits into
base: 4.7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-databind:2.17.1"
implementation "io.sdkman:gradle-sdkvendor-plugin:3.0.0"
implementation "org.asciidoctor:asciidoctor-gradle-jvm:2.4.0"
implementation "com.github.johnrengelman:shadow:8.1.1"
implementation "com.gradleup.shadow:shadow-gradle-plugin:8.3.2"
implementation "com.microsoft.azure:azure-functions-gradle-plugin:1.16.1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "io.micronaut.internal.starter.published-module"
id "io.micronaut.internal.starter.convention"
id "application"
id "com.github.johnrengelman.shadow"
id "com.gradleup.shadow"
id "io.micronaut.starter.rocker"
id "io.sdkman.vendors"
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/templates.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ gradle-enterprise = "3.18.1"
gradle-enterprise-maven-custom-data = "1.13"
gradle-enterprise-maven-extension = "1.22.1"
gradle-jrebel-plugin = "1.1.10"
gradle-shadow-plugin = "8.1.1"
gradle-shadow-plugin = "8.3.2"
jib-gradle-plugin = "2.8.0"
jobrunr = "6.3.5"
jruby = "9.4.5.0"
Expand Down Expand Up @@ -106,7 +106,7 @@ gradle-enterprise = { module = "com.gradle:gradle-enterprise-gradle-plugin", ver
gradle-enterprise-maven = { module = "com.gradle:gradle-enterprise-maven-extension", version.ref = "gradle-enterprise-maven-extension" }
gradle-enterprise-maven-custom-data = { module = "com.gradle:common-custom-user-data-maven-extension", version.ref = "gradle-enterprise-maven-custom-data" }
gradle-jrebel-plugin = { module = "gradle.plugin.org.zeroturnaround:gradle-jrebel-plugin", version.ref = "gradle-jrebel-plugin" }
gradle-shadow-plugin = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "gradle-shadow-plugin" }
gradle-shadow-plugin = { module = "com.gradleup.shadow:shadow-gradle-plugin", version.ref = "gradle-shadow-plugin" }
jib-gradle-plugin = { module = "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin", version.ref = "jib-gradle-plugin" }
jobrunr-micronaut = { module = "org.jobrunr:jobrunr-micronaut-feature", version.ref = "jobrunr" }
jruby = { module = "org.jruby:jruby", version.ref = "jruby" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public String getCategory() {
@Override
public void apply(GeneratorContext generatorContext) {
if (generatorContext.getBuildTool().isGradle()) {
generatorContext.addHelpLink("Shadow Gradle Plugin", "https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow");
generatorContext.addHelpLink("Shadow Gradle Plugin", "https://plugins.gradle.org/plugin/com.gradleup.shadow");
GradlePlugin.Builder builder = GradlePlugin.builder()
.id("com.github.johnrengelman.shadow")
.lookupArtifactId("shadow");
.id("com.gradleup.shadow")
.lookupArtifactId("shadow-gradle-plugin");

generatorContext.addBuildPlugin(builder.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AzureCloudFunctionSpec extends ApplicationContextSpec implements CommandOu
build.contains('os = "linux"')
!build.contains('implementation "io.micronaut:micronaut-http-server-netty"')
!build.contains('implementation "io.micronaut:micronaut-http-client"')
!build.contains('"com.github.johnrengelman.shadow"')
!build.contains('"com.gradleup.shadow"')
!build.contains('shadowJar')
readme?.contains("Micronaut and Azure Function")
output.containsKey("host.json")
Expand Down Expand Up @@ -108,7 +108,7 @@ class AzureCloudFunctionSpec extends ApplicationContextSpec implements CommandOu
build.contains('os = "linux"')
!build.contains('implementation "io.micronaut:micronaut-http-server-netty"')
!build.contains('implementation "io.micronaut:micronaut-http-client"')
!build.contains('"com.github.johnrengelman.shadow"')
!build.contains('"com.gradleup.shadow"')
!build.contains('shadowJar')

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class ShadePluginSpec extends ApplicationContextSpec implements CommandOutputFi

then:
readme
readme.contains("[Shadow Gradle Plugin](https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow)")
readme.contains("[Shadow Gradle Plugin](https://plugins.gradle.org/plugin/com.gradleup.shadow)")
}

@Unroll
void 'test shade plugin is applied by default for Gradle and language=#language type=#applicationType'(Language language, ApplicationType applicationType) {
given:
String pluginId = 'com.github.johnrengelman.shadow'
String pluginId = 'com.gradleup.shadow'
when:
String template = new BuildBuilder(beanContext, BuildTool.GRADLE)
.language(language)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SpringBootStarterSpec extends ApplicationContextSpec implements CommandOut
verifier.hasBuildPlugin("io.spring.dependency-management")
!verifier.hasBuildPlugin("io.micronaut.application")
!verifier.hasBuildPlugin("io.micronaut.library")
!verifier.hasBuildPlugin("com.github.johnrengelman.shadow")
!verifier.hasBuildPlugin("com.gradleup.shadow")
verifier.hasDependency("org.springframework.boot", "spring-boot-starter", Scope.COMPILE)
verifier.hasDependency("org.springframework.boot", "spring-boot-starter-test", Scope.TEST)
template.contains("mavenCentral()")
Expand Down
2 changes: 1 addition & 1 deletion starter-gcp-function/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "io.micronaut.internal.starter.convention"
id "com.github.johnrengelman.shadow"
id "com.gradleup.shadow"
id "application"
}

Expand Down
2 changes: 1 addition & 1 deletion starter-web-netty/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "io.micronaut.internal.starter.convention"
id "com.github.johnrengelman.shadow"
id "com.gradleup.shadow"
id "io.micronaut.crac"
id "io.micronaut.application"
}
Expand Down
Loading