-
Notifications
You must be signed in to change notification settings - Fork 927
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
Upgrade Gradle to 8.1.1 #4854
Upgrade Gradle to 8.1.1 #4854
Changes from all commits
59bc118
31e83f0
8dfc487
e185bfc
228cf4a
f15feb4
b1e6ffe
1d18d36
7a5f791
8cc6f69
16aa066
64183fc
785a5de
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 | ||||
---|---|---|---|---|---|---|
|
@@ -15,8 +15,6 @@ buildscript { | |||||
} | ||||||
} | ||||||
|
||||||
def managedDependencyOverrides = [] as Set | ||||||
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. It was an unused code. |
||||||
|
||||||
allprojects { p -> | ||||||
ext { | ||||||
// Add managedVersions() for backward compatibility with dependencies.yml | ||||||
|
@@ -178,19 +176,8 @@ configure(projectsWithFlags('java')) { | |||||
dependencies { | ||||||
configurations.configureEach { configuration -> | ||||||
// Add to resolvable configurations | ||||||
if (configuration.canBeResolved && !configuration.canBeConsumed) { | ||||||
add(configuration.name, platform(dependencyManagementProject)) | ||||||
} | ||||||
|
||||||
// Find version overrides in dependency declaration configurations | ||||||
if (!configuration.canBeResolved && !configuration.canBeConsumed) { | ||||||
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. Question) I'm wondering if we want to target resolvable dependencies instead (since these are the configurations which will actually be applied)
Suggested change
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. There are three types of configurations.
We directly added the dependencies to resolvable configurations. In particular, platform dependencies are added to each configuration here. Unfortunately, in Gradle 8, bucket styles are only allowed to add dependencies, and exceptions are raised if the dependencies are added to resolvable ones. So I changed to add the platform dependencies to the buckets. It should be fine because they will be eventually inherited into resolvable configurations. All resolvable configurations defined in the Gradle Java plugin have at least one bucket configuration. The only exception was 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. I understood the concept while reviewing the PR, but I'm not sure why I left this review 😅 Sorry about that. |
||||||
configuration.dependencies.configureEach { dep -> | ||||||
if (dep instanceof org.gradle.api.artifacts.ExternalDependency) { | ||||||
if (dep.version != null) { | ||||||
managedDependencyOverrides.add(String.valueOf("${dep.module}:${dep.version}")) | ||||||
} | ||||||
} | ||||||
} | ||||||
add(configuration.name, platform(dependencyManagementProject)) | ||||||
} | ||||||
} | ||||||
} | ||||||
|
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.
Gradle prohibits overriding the test engine with
Test
tasks.On the other hand, the JVM Test Suite Plugin supports multiple test engines.
So the test tasks have been migrated to the new test plugin.