-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fix build script to run with Gradle 7 #145
Conversation
0a63505
to
16a9213
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor request for documenting why a certain gradle setting is needed
build.gradle
Outdated
classpath = sourceSets.main.runtimeClasspath | ||
} | ||
|
||
task generateGemJarRequiresFile { | ||
configurations.implementation.canBeResolved = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here on why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that without that the
configurations.implementation.allDependencies {....}
can't see the resolved dependencies. According to the table (it's from Gradle's JavaLibraryPlugin, but the same applies to JavaPlugin) the implementation
configuration doesn't resolve the dependencies.
Forcing that canBeResolved = true
the dependencies get resolved and can be seen from the other inspection code segments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best solution is to use runtimeClasspath
in configurations.runtimeClasspath.allDependencies
because it's already resolved and don't need the explicit resolution flag
16a9213
to
8716136
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Release notes
Update build infrastructure to Gradle 7.2
What does this PR do?
Update the Gradle wrapper used to version 7.2 and fixed
build.gradle
script.Why is it important/What is the impact to the user?
Developers can use JDK >= 17 to build the plugin
Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration files (and/or docker env variables)I have added tests that prove my fix is effective or that my feature worksAuthor's Checklist
How to test this PR locally
Run
./gradlew clean vendor
Related issues