File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 - name : Set up gradle
2525 uses : gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
2626
27- # --max-workers=1: scan-gradle-plugin is not thread-safe when tasks run in parallel.
28- # Each ossIndexAudit task calls project.getAllprojects() and resolves configurations
29- # at execution time; concurrent tasks racing on the same configurations cause
30- # intermittent NullPointerExceptions. Running serially avoids this.
31- - run : ./gradlew ossIndexAudit --max-workers=1
27+ # --no-parallel is needed to avoid OverlappingFileLockException on the shared OSS Index cache
28+ - run : ./gradlew ossIndexAudit --no-configuration-cache --no-parallel --info
3229 id : audit
3330 continue-on-error : true
3431 env :
Original file line number Diff line number Diff line change 3434
3535# Vim
3636.swp
37+
38+ # scan-gradle-plugin
39+ oss-index-cyclonedx-bom.json
Original file line number Diff line number Diff line change @@ -52,14 +52,7 @@ ossIndexAudit {
5252 username = System .getenv(" SONATYPE_OSS_INDEX_USER" ) ? : " "
5353 password = System .getenv(" SONATYPE_OSS_INDEX_PASSWORD" ) ? : " "
5454 outputFormat = org.sonatype.gradle.plugins.scan.ossindex.OutputFormat .JSON_CYCLONE_DX_1_4
55- }
56-
57- // scan-gradle-plugin accesses Task.project at execution time, which is incompatible with
58- // Gradle 9's configuration cache. Mark the task so Gradle discards the cache entry rather
59- // than failing the build with 44 configuration cache problems.
60- // https://github.com/sonatype-nexus-community/scan-gradle-plugin/issues (no Gradle 9 support yet)
61- tasks.named(" ossIndexAudit" ) {
62- notCompatibleWithConfigurationCache(" scan-gradle-plugin is not compatible with Gradle 9 configuration cache" )
55+ isPrintBanner = false
6356}
6457
6558val testJavaVersion = gradle.startParameter.projectProperties.get(" testJavaVersion" )?.let (JavaVersion ::toVersion)
Original file line number Diff line number Diff line change @@ -104,13 +104,6 @@ testing {
104104 }
105105}
106106
107- // Exclude the compile-stub subproject from this module's audit: the scan plugin traverses
108- // Gradle subprojects at execution time, which Gradle 9 forbids without an exclusive lock.
109- // compile-stub runs its own ossIndexAudit task independently.
110- ossIndexAudit {
111- modulesExcluded = mutableSetOf (" compile-stub" )
112- }
113-
114107tasks {
115108 check {
116109 dependsOn(testing.suites)
Original file line number Diff line number Diff line change @@ -14,9 +14,3 @@ dependencies {
1414 testImplementation(" org.junit.jupiter:junit-jupiter-params" )
1515 testImplementation(" org.testcontainers:testcontainers-junit-jupiter" )
1616}
17-
18- // Skip ossIndexAudit: the scan plugin traverses Gradle subprojects at execution time, which
19- // Gradle 9 forbids without an exclusive lock. Each subproject runs its own audit independently.
20- tasks.named(" ossIndexAudit" ) {
21- enabled = false
22- }
You can’t perform that action at this time.
0 commit comments