-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-18142 Switch to com.gradleup.shadow
#18018
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
Changes from all commits
c66e1ce
47f9240
647c07a
62a8c6e
5b263eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ plugins { | |
|
|
||
| id "com.github.spotbugs" version '6.0.25' apply false | ||
| id 'org.scoverage' version '8.0.3' apply false | ||
| id 'io.github.goooler.shadow' version '8.1.3' apply false | ||
| id 'com.gradleup.shadow' version '8.3.6' apply false | ||
| id 'com.diffplug.spotless' version "6.25.0" | ||
| } | ||
|
|
||
|
|
@@ -364,17 +364,14 @@ subprojects { | |
| if (!shouldPublishWithShadow) { | ||
| from components.java | ||
| } else { | ||
| apply plugin: 'io.github.goooler.shadow' | ||
| project.shadow.component(mavenJava) | ||
| apply plugin: 'com.gradleup.shadow' | ||
| from components.shadow | ||
|
|
||
| // Fix for avoiding inclusion of runtime dependencies marked as 'shadow' in MANIFEST Class-Path. | ||
| // https://github.com/johnrengelman/shadow/issues/324 | ||
| // https://github.com/GradleUp/shadow/issues/324 | ||
| afterEvaluate { | ||
| pom.withXml { xml -> | ||
| if (xml.asNode().get('dependencies') == null) { | ||
| xml.asNode().appendNode('dependencies') | ||
| } | ||
| def dependenciesNode = xml.asNode().get('dependencies').get(0) | ||
| def dependenciesNode = xml.asNode().get('dependencies') ?: xml.asNode().appendNode('dependencies') | ||
dejan2609 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| project.configurations.shadowed.allDependencies.each { | ||
| def dependencyNode = dependenciesNode.appendNode('dependency') | ||
| dependencyNode.appendNode('groupId', it.group) | ||
|
|
@@ -1824,6 +1821,10 @@ project(':clients') { | |
| generator project(':generator') | ||
| } | ||
|
|
||
| tasks.withType(GenerateModuleMetadata) { | ||
| enabled = false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be publishing the module metadata, any reason to skip it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will update this asap.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @apoorvmittal10 Let me digest what is going on here just by using Scenario:
Results for someNewProject
(see my comment #18018 (comment) for more details about testing)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to sum it up: @poom-kitti (and mine) intention is to have exact behavior for All in all: we ended up with a situation where we are trying to have all these three things at once:
I dare to assume that this could be addressed on https://github.com/GradleUp/shadow side, maybe @Goooler can provide at least some insights.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree it makes sense to do things step by step. This PR is an improvement over our current shadow plugin and fix for releasing signed libs.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Git commits are rebased onto trunk; will leave this conversation opened (just in case that someone wants to do an additional review).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a KAFKA ticket for re-enabling the Gradle module metadata? |
||
| } | ||
|
|
||
| task createVersionFile() { | ||
| def receiptFile = file("${layout.buildDirectory.get().asFile.path}/kafka/$buildVersionFileName") | ||
| inputs.property "commitId", commitId | ||
|
|
@@ -1858,7 +1859,7 @@ project(':clients') { | |
| // dependencies excluded from the final jar, since they are declared as runtime dependencies | ||
| dependencies { | ||
| project.configurations.shadowed.allDependencies.each { | ||
| exclude(dependency(it.group + ':' + it.name)) | ||
| exclude(dependency(it)) | ||
| } | ||
| // exclude proto files from the jar | ||
| exclude "**/opentelemetry/proto/**/*.proto" | ||
|
|
@@ -3217,7 +3218,7 @@ project(':streams:upgrade-system-tests-39') { | |
|
|
||
| project(':jmh-benchmarks') { | ||
|
|
||
| apply plugin: 'io.github.goooler.shadow' | ||
| apply plugin: 'com.gradleup.shadow' | ||
|
|
||
| shadowJar { | ||
| archiveBaseName = 'kafka-jmh-benchmarks' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.