Skip to content

Commit 741fbad

Browse files
authored
Update script to use snapshot builds in integration tests (#1691)
Now the script works in the presence of [isolated projects](https://docs.gradle.org/current/userguide/isolated_projects.html), which were recently enabled by JUnit. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Improved internal build configuration for more consistent dependency resolution. * Renamed an internal generic-call inference result type without changing public behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 7489d69 commit 741fbad

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
// An init script to override a build configuration to use a snapshot version of NullAway
2-
allprojects {
2+
gradle.lifecycle.beforeProject {
33
repositories {
44
mavenCentral()
55
mavenLocal()
66
gradlePluginPortal()
77
}
8-
}
98

10-
gradle.projectsLoaded {
11-
rootProject.allprojects {
12-
configurations.all {
13-
resolutionStrategy {
14-
eachDependency {
15-
if (requested.group == "com.uber.nullaway") {
16-
useVersion("+")
17-
}
9+
configurations.configureEach {
10+
resolutionStrategy {
11+
eachDependency {
12+
if (requested.group == "com.uber.nullaway") {
13+
useVersion("+")
1814
}
19-
cacheChangingModulesFor(0, "seconds")
20-
cacheDynamicVersionsFor(0, "seconds")
2115
}
16+
cacheChangingModulesFor(0, "seconds")
17+
cacheDynamicVersionsFor(0, "seconds")
2218
}
2319
}
2420
}

0 commit comments

Comments
 (0)