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

KAFKA-12415: Prepare for Gradle 7.0 and restrict transitive scope for non api dependencies #10203

Merged
merged 28 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
784cc81
Replace maven with maven-publish and use plugin dsl for plugin config…
ijuma Feb 24, 2021
65a1ad0
Comment out and remove maven plugin code
ijuma Feb 24, 2021
f51d0ea
`compile`, `testCompile`, `runtime`, `testRuntime` were all removed
ijuma Feb 24, 2021
59f3756
Fix cyclic issue affecting Streams
ijuma Feb 24, 2021
78b40f2
Use java-library and use api/implementation correctly
ijuma Feb 24, 2021
d64ef6e
Fix more deprecations
ijuma Feb 25, 2021
5507285
Configure maven publisher
ijuma Feb 25, 2021
cd36077
Update gradle and plugins
ijuma Feb 25, 2021
d54a8be
Don't publish jmh-benchmark module
ijuma Feb 25, 2021
f73e84b
Use `publishToMavenLocal` in `Jenkinsfile`
ijuma Feb 26, 2021
56d5a9b
Add task aliases for backward compatibility
ijuma Feb 26, 2021
cabdc94
`shouldSign` doesn't need to check the task names since it only appli…
ijuma Feb 26, 2021
9b6b730
Improve comment
ijuma Feb 26, 2021
5498ad9
Use `api` for some of connect-json project dependencies
ijuma Feb 27, 2021
c084401
More tweaks
ijuma Feb 27, 2021
7064e91
streams connect-json dependency should be `api`
ijuma Feb 27, 2021
7c87c6a
Update readme to mention publish as the recommended command
ijuma Mar 2, 2021
73c9b0f
Export streams and clients apis from streams-test-utils
ijuma Mar 2, 2021
09ffca7
Merge remote-tracking branch 'apache-github/trunk' into gradle-7.0-ready
ijuma Mar 2, 2021
4855a78
Merge remote-tracking branch 'apache-github/trunk' into gradle-7.0-ready
ijuma Mar 3, 2021
83b2411
Remove inaccurate line about key signing
ijuma Mar 3, 2021
1f257e5
`artifacts` doesn't work with maven publish, replace it with somethin…
ijuma Mar 3, 2021
b3205f5
classifier -> archiveClassifier
ijuma Mar 3, 2021
b365ee9
Fix folder name in release tar gz
ijuma Mar 3, 2021
7f0281b
Fix jmh-benchmark script since the jar now includes a version
ijuma Mar 3, 2021
13fa697
Remove duplicate `all` from jmh benchmarks name
ijuma Mar 4, 2021
e581e56
Use api for `connect-api` in `connect-json` and `connect-transforms`.
ijuma Mar 4, 2021
9c35471
Add notable changes as a result of this PR
ijuma Mar 4, 2021
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
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def doStreamsArchetype() {
echo 'Verify that Kafka Streams archetype compiles'

sh '''
./gradlew streams:install clients:install connect:json:install connect:api:install \
|| { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }
./gradlew streams:publishToMavenLocal clients:publishToMavenLocal connect:json:publishToMavenLocal connect:api:publishToMavenLocal \
|| { echo 'Could not publish kafka-streams.jar (and dependencies) locally to Maven'; exit 1; }
'''

VERSION = sh(script: 'grep "^version=" gradle.properties | cut -d= -f 2', returnStdout: true).trim()
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ Generate coverage for a single module, i.e.:
### Building a binary release gzipped tar ball ###
./gradlew clean releaseTarGz

The above command will fail if you haven't set up the signing key. To bypass signing the artifact, you can run:

./gradlew clean releaseTarGz -x signArchives
Copy link
Contributor

Choose a reason for hiding this comment

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

@ijuma the proper way to skip signing is now to run ./gradlew clean releaseTarGz -DskipSigning, is that right? Is there a reason we removed this instruction from the README instead of updating it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Signing is skipped by default. Are you seeing something different? There is a table that describes skipSigning:

Copy link
Contributor

@ableegoldman ableegoldman Mar 12, 2021

Choose a reason for hiding this comment

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

Yes, we're suddenly seeing our soak test (an application which deploys from trunk) fail with

./gradlew clean install releaseTarGz
> Configure project :
Building project 'core' with Scala version 2.13.5
Building project 'streams-scala' with Scala version 2.13.5
> Task :connect:signMavenJavaPublication FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':connect:signMavenJavaPublication'.
> Cannot perform signing task ':connect:signMavenJavaPublication' because it has no configured signatory

I personally haven't been able to reproduce this, but both @wcarlson5 and @lct45 have reported running into this issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that your command has install while the README line I deleted did not (and was wrong). It is still weird that you're seeing this for snapshot builds. I'll work with you all offline to try and figure it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We figured it out, the build was using a non snapshot version. Passing -PskipSigning=true fixed it. Submitted #10307 to make it easier to debug these issues in the future.


The release file can be found inside `./core/build/distributions/`.

### Building auto generated messages ###
Expand Down Expand Up @@ -125,6 +121,12 @@ build directory (`${project_dir}/bin`) clashes with Kafka's scripts directory an
to avoid known issues with this configuration.

### Publishing the jar for all version of Scala and for all projects to maven ###
The recommended command is:

./gradlewAll publish

For backwards compatibility, the following also works:

./gradlewAll uploadArchives

Please note for this to work you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`) and assign the following variables
Expand Down Expand Up @@ -167,6 +169,12 @@ Please note for this to work you should create/update user maven settings (typic


### Installing the jars to the local Maven repository ###
The recommended command is:

./gradlewAll publishToMavenLocal
ijuma marked this conversation as resolved.
Show resolved Hide resolved

For backwards compatibility, the following also works:

./gradlewAll install

### Building the test jar ###
Expand Down
Loading