Skip to content

Commit 428fbe3

Browse files
committed
add --no-parallel workaround to the readme for Gradle 9+ users
1 parent 66d2a12 commit 428fbe3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ checks for updates to Gradle itself.
1414
- [buildscript block](#buildscript-block)
1515
- [Using a Gradle init script](#using-a-gradle-init-script)
1616
- [Related plugins](#related-plugins)
17-
- [Known issues](#known-issues)
17+
- [Known issues](#workarounds-for-related-gradle-issues)
1818
- [dependencyUpdates](#dependencyupdates)
1919
- [Multi-project build](#multi-project-build)
2020
- [Revisions](#revisions)
@@ -125,6 +125,7 @@ You may also wish to explore additional functionality provided by,
125125

126126
### Workarounds for related Gradle Issues ###
127127
- https://github.com/gradle/gradle/issues/24636: setting the flag `org.gradle.configuration-cache.problems=warn` in `gradle.properties` causes the dependency check to fail to find dependencies with message `No dependencies found`. Comment out that line until the upstream issue with Gradle is fixed.
128+
- In Gradle 9+, parallel execution is incompatible with having one project's task resolving another project configuration's dependencies. This requires obtaining an internal lock not available to plugin developers, but is relied on by native plugins (e.g. for IDE support). This simply requires passing the `--no-parallel` flag when running the `dependencyUpdates` task, which allows you to continue to benefit from the speedup in other build scenarios.
128129

129130
## Tasks
130131

@@ -286,11 +287,11 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
286287
tasks.withType<DependencyUpdatesTask> {
287288
resolutionStrategy {
288289
componentSelection {
289-
all {
290+
all(Action<ComponentSelectionWithCurrent> {
290291
if (isNonStable(candidate.version) && !isNonStable(currentVersion)) {
291292
reject("Release candidate")
292293
}
293-
}
294+
})
294295
}
295296
}
296297
}

0 commit comments

Comments
 (0)