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

[Gradle] Update shadow plugin #116826

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ElasticsearchJavadocPluginFuncTest extends AbstractGradleFuncTest {
buildFile << """
plugins {
id 'elasticsearch.java-doc'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.gradleup.shadow'
id 'java'
}
group = 'org.acme.depending'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
plugins {
id 'elasticsearch.java'
id 'elasticsearch.publish'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

repositories {
Expand Down Expand Up @@ -186,7 +186,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
plugins {
id 'elasticsearch.java'
id 'elasticsearch.publish'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

dependencies {
Expand Down Expand Up @@ -277,7 +277,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
plugins {
id 'elasticsearch.internal-es-plugin'
id 'elasticsearch.publish'
id 'com.github.johnrengelman.shadow'
id 'com.gradleup.shadow'
}

esplugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void execute(Task task) {
}
});
});
project.getPluginManager().withPlugin("com.github.johnrengelman.shadow", p -> {
project.getPluginManager().withPlugin("com.gradleup.shadow", p -> {
project.getTasks().withType(ShadowJar.class).configureEach(shadowJar -> {
/*
* Replace the default "-all" classifier with null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void execute(Task t) {
* If this project builds a shadow JAR than any unit tests should test against that artifact instead of
* compiled class output and dependency jars. This better emulates the runtime environment of consumers.
*/
project.getPluginManager().withPlugin("com.github.johnrengelman.shadow", p -> {
project.getPluginManager().withPlugin("com.gradleup.shadow", p -> {
if (test.getName().equals(JavaPlugin.TEST_TASK_NAME)) {
// Remove output class files and any other dependencies from the test classpath, since the shadow JAR includes these
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static CopySpec createBundleSpec(
copySpec.exclude("plugin-security.codebases");
});
bundleSpec.from(
(Callable<TaskProvider<Task>>) () -> project.getPluginManager().hasPlugin("com.github.johnrengelman.shadow")
(Callable<TaskProvider<Task>>) () -> project.getPluginManager().hasPlugin("com.gradleup.shadow")
? project.getTasks().named("shadowJar")
: project.getTasks().named("jar")
);
Expand Down
2 changes: 1 addition & 1 deletion gradle/build.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ maven-model = "org.apache.maven:maven-model:3.6.2"
mockito-core = "org.mockito:mockito-core:1.9.5"
nebula-info = "com.netflix.nebula:gradle-info-plugin:11.3.3"
reflections = "org.reflections:reflections:0.9.12"
shadow-plugin = "com.github.breskeby:shadow:3b035f2"
shadow-plugin = "com.gradleup.shadow:shadow-gradle-plugin:8.3.5"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we can remove all the jitpack repository stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. done.

snakeyaml = { group = "org.yaml", name = "snakeyaml", version = { strictly = "2.0" } }
spock-core = { group = "org.spockframework", name="spock-core", version.ref="spock" }
spock-junit4 = { group = "org.spockframework", name="spock-junit4", version.ref="spock" }
Expand Down
80 changes: 80 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@
<sha256 value="b2bd29c31fda49a9b28a22b9e5c2b26443bcfa99c1a28eab70ab9c7d349b5002" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.woodstox" name="woodstox-core" version="6.5.1">
<artifact name="woodstox-core-6.5.1.jar">
<sha256 value="c928d60665c6415fb1c39775cf95cfc44f7f4580cf5ab01b1c380ebffd76887f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.woodstox" name="woodstox-core" version="6.7.0">
<artifact name="woodstox-core-6.7.0.jar">
<sha256 value="81cdeef50567735bda9f6b4aabe0cc0a3f6c04f15569192bc6505393d2612c25" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -799,6 +804,11 @@
<sha256 value="0adf32afef4ae46a131367e393d18a5d9529750dfd1432287797a64b2c36c7ef" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.gradleup.shadow" name="shadow-gradle-plugin" version="8.3.5">
<artifact name="shadow-gradle-plugin-8.3.5.jar">
<sha256 value="54e08dd20a82775e3317a4725a1a5e4ec8b1b1c0f346de702a49d9ed4815b735" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.h2database" name="h2" version="1.4.197">
<artifact name="h2-1.4.197.jar">
<sha256 value="37f5216e14af2772930dff9b8734353f0a80e89ba3f33e065441de6537c5e842" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1236,6 +1246,11 @@
<sha256 value="a58af12ee1b68cfd2ebb0c27caef164f084381a00ec81a48cc275fd7ea54e154" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="commons-io" name="commons-io" version="2.17.0">
<artifact name="commons-io-2.17.0.jar">
<sha256 value="4aa4ca48f3dfd30b78220b7881d8cb93eac4093ec94361b6befa9487998a550b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="commons-io" name="commons-io" version="2.2">
<artifact name="commons-io-2.2.jar">
<sha256 value="675f60bd11a82d481736591fe4054c66471fa5463d45616652fd71585792ba87" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1922,6 +1937,11 @@
<sha256 value="befbfc79e744e9892cfa7db96df3b6e82dc17d2571af42aa427976fc22299838" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.ant" name="ant" version="1.10.15">
<artifact name="ant-1.10.15.jar">
<sha256 value="763acda4a69588c9ea8817a952851ff0c2fc4bffa1d081c2565dc407f29d5794" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.ant" name="ant-launcher" version="1.10.11">
<artifact name="ant-launcher-1.10.11.jar">
<sha256 value="dab530df7a980b5ac8fd7e8d208243ae0d3ebd6de09b1aa2ce756360cc2ed256" origin="Generated by Gradle"/>
Expand All @@ -1937,6 +1957,11 @@
<sha256 value="cd7695b3bfb6964ab71b6a0b31dad60005ae77fe502132364679aacf08f77970" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.ant" name="ant-launcher" version="1.10.15">
<artifact name="ant-launcher-1.10.15.jar">
<sha256 value="5c8551990307a032336d98ddaed549a39a689f07d4d4c6b950601bf22b3d6a1b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.arrow" name="arrow-format" version="16.1.0">
<artifact name="arrow-format-16.1.0.jar">
<sha256 value="ad97e0fc72e193b1de3cbce4818d1ff16e81673fd523d001e8d2774bde40ee6c" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -2810,6 +2835,11 @@
<sha256 value="2f43eea679ea66f14ca0f13fec2a8600ac124f5a5231dcb4df8393eddcb97550" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.logging.log4j" name="log4j-api" version="2.24.1">
<artifact name="log4j-api-2.24.1.jar">
<sha256 value="6e77bb229fc8dcaf09038beeb5e9030b22e9e01b51b458b0183ce669ebcc92ef" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.logging.log4j" name="log4j-core" version="2.17.1">
<artifact name="log4j-core-2.17.1.jar">
<sha256 value="c967f223487980b9364e94a7c7f9a8a01fd3ee7c19bdbf0b0f9f8cb8511f3d41" origin="Generated by Gradle"/>
Expand All @@ -2830,6 +2860,11 @@
<sha256 value="6137df848cdaed9f4d5076f75513c6c85da80b953f4e7acca38098b770763f55" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.logging.log4j" name="log4j-core" version="2.24.1">
<artifact name="log4j-core-2.24.1.jar">
<sha256 value="00bcf388472ca80a687014181763b66d777177f22cbbf179fd60e1b1ac9bc9b0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.logging.log4j" name="log4j-jcl" version="2.19.0">
<artifact name="log4j-jcl-2.19.0.jar">
<sha256 value="47f768ffd66107a66f0c2a19445ab1e42ce6719a7f30f9aa9ef96157c83949fd" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -2965,6 +3000,16 @@
<sha256 value="8bd7bd94136f5879a9748ab12c2b263a5519d8ce813bfc40d40f5bf086a7bebd" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-api-meta" version="4.0.0-alpha-9">
<artifact name="maven-api-meta-4.0.0-alpha-9.jar">
<sha256 value="32c4f5cadbab680c34952f9cb570457a1383ccec4c9a57b0392607d7191c6949" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-api-xml" version="4.0.0-alpha-9">
<artifact name="maven-api-xml-4.0.0-alpha-9.jar">
<sha256 value="29b2628d0f028119715916849c19eed45b32cdc67eb13551798c73afa4aa23d6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-artifact" version="3.6.1">
<artifact name="maven-artifact-3.6.1.jar">
<sha256 value="797fa1bcf54d7216e863b8177c04507d09c708eec153626eca473054c0eb56f3" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -3020,6 +3065,11 @@
<sha256 value="2d669935e1069c2e9566f3cc81dd5da80b170ac64d09597f6ef7de2f1ff1b149" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-xml-impl" version="4.0.0-alpha-9">
<artifact name="maven-xml-impl-4.0.0-alpha-9.jar">
<sha256 value="26e702b881d57ae4ee88d02c00940ba64063705ee69205ae8958bf839a8b06b1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven.resolver" name="maven-resolver-api" version="1.3.3">
<artifact name="maven-resolver-api-1.3.3.jar">
<sha256 value="eea947a6f7d7f60b0f62db07bf43fccad6cb1ab6b7928cbc5e1c60c2d89d33fa" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -3393,6 +3443,16 @@
<sha256 value="86e0255d4c879c61b4833ed7f13124e8bb679df47debb127326e7db7dd49a07b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.plexus" name="plexus-utils" version="4.0.2">
<artifact name="plexus-utils-4.0.2.jar">
<sha256 value="8957274e75fe2c278b1428dd16a0daeee1dd38152cb6eff816177ac28fccb697" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.plexus" name="plexus-xml" version="4.0.4">
<artifact name="plexus-xml-4.0.4.jar">
<sha256 value="069e78b537108dc6124a67073fc998264791f6b6499e955a38e72bb3e4fe1adf" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.woodstox" name="stax2-api" version="4.2.1">
<artifact name="stax2-api-4.2.1.jar">
<sha256 value="678567e48b51a42c65c699f266539ad3d676d4b1a5b0ad7d89ece8b9d5772579" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -4153,6 +4213,11 @@
<sha256 value="adf46d5e34940bdf148ecdd26a9ee8eea94496a72034ff7141066b3eea5c4e9d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm" version="9.7.1">
<artifact name="asm-9.7.1.jar">
<sha256 value="8cadd43ac5eb6d09de05faecca38b917a040bb9139c7edeb4cc81c740b713281" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm-analysis" version="7.2">
<artifact name="asm-analysis-7.2.jar">
<sha256 value="be922aae60ff1ff1768e8e6544a38a7f92bd0a6d6b0b9791f94955d1bd453de2" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -4198,6 +4263,11 @@
<sha256 value="389bc247958e049fc9a0408d398c92c6d370c18035120395d4cba1d9d9304b7a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm-commons" version="9.7.1">
<artifact name="asm-commons-9.7.1.jar">
<sha256 value="9a579b54d292ad9be171d4313fd4739c635592c2b5ac3a459bbd1049cddec6a0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm-tree" version="7.2">
<artifact name="asm-tree-7.2.jar">
<sha256 value="c063f5a67fa03cdc9bd79fd1c2ea6816cc4a19473ecdfbd9e9153b408c6f2656" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -4238,6 +4308,11 @@
<sha256 value="62f4b3bc436045c1acb5c3ba2d8ec556ec3369093d7f5d06c747eb04b56d52b1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm-tree" version="9.7.1">
<artifact name="asm-tree-9.7.1.jar">
<sha256 value="9929881f59eb6b840e86d54570c77b59ce721d104e6dfd7a40978991c2d3b41f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.ow2.asm" name="asm-util" version="7.2">
<artifact name="asm-util-7.2.jar">
<sha256 value="6e24913b021ffacfe8e7e053d6e0ccc731941148cfa078d4f1ed3d96904530f8" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -4423,6 +4498,11 @@
<sha256 value="374fe02a09314da6ec8219e005598e760323a1abe4b715cc33ce3e2a9bcda932" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.vafer" name="jdependency" version="2.11">
<artifact name="jdependency-2.11.jar">
<sha256 value="cdda03003fa9551315a4cc3fc163f18495f191b49a8f70a3aae232f049a7fdd0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.vafer" name="jdependency" version="2.7.0">
<artifact name="jdependency-2.7.0.jar">
<sha256 value="d63efd5746ff408943a7dd7ef85ae9f09aa7fb63bb2b16911427ce6c45b59fd0" origin="Generated by Gradle"/>
Expand Down
2 changes: 1 addition & 1 deletion plugins/repository-hdfs/hadoop-client-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'elasticsearch.build'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

dependencies {
implementation "org.apache.hadoop:hadoop-client-api:${project.parent.versions.hadoop}"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/hdfs-fixture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

apply plugin: 'elasticsearch.java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

Expand Down
2 changes: 1 addition & 1 deletion x-pack/libs/es-opensaml-security-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

apply plugin: 'elasticsearch.build'
apply plugin: 'elasticsearch.publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

dependencies {
implementation "org.opensaml:opensaml-security-api:${versions.opensaml}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

apply plugin: 'elasticsearch.build'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

// See the build.gradle file in the parent directory for an explanation of this unusual build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

apply plugin: 'elasticsearch.build'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

// See the build.gradle file in the parent directory for an explanation of this unusual build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

apply plugin: 'elasticsearch.build'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

// See the build.gradle file in the parent directory for an explanation of this unusual build

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugin/sql/jdbc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'elasticsearch.build'
apply plugin: 'elasticsearch.publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'

description = 'JDBC driver for Elasticsearch'

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugin/sql/sql-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams
*/

apply plugin: 'elasticsearch.build'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.gradleup.shadow'
/* We don't use the 'application' plugin because it builds a zip and tgz which
* we don't want. */

Expand Down