Skip to content

Commit 63271b7

Browse files
authored
Fully enable configuration cache test (#467)
Bumps osdetector plugin version to 1.7.0 and removes flags for ignoring configuration cache problems in tests.
1 parent 371b114 commit 63271b7

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dependencies {
5656
compileOnly "com.android.tools.build:gradle:3.5.0"
5757

5858
compile 'com.google.guava:guava:27.0.1-jre'
59-
compile 'com.google.gradle:osdetector-gradle-plugin:1.6.2'
59+
compile 'com.google.gradle:osdetector-gradle-plugin:1.7.0'
6060
compile 'commons-lang:commons-lang:2.6'
6161

6262
testCompile 'junit:junit:4.12'

src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import spock.lang.Unroll
1515
*/
1616
@CompileDynamic
1717
class ProtobufAndroidPluginTest extends Specification {
18-
private static final List<String> GRADLE_VERSION = ["5.6", "6.5-milestone-1"]
19-
private static final List<String> ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0-alpha10"]
18+
private static final List<String> GRADLE_VERSION = ["5.6", "6.5", "6.8"]
19+
private static final List<String> ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-alpha10"]
2020

2121
@Unroll
2222
void "testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]"() {
@@ -70,8 +70,7 @@ class ProtobufAndroidPluginTest extends Specification {
7070
mainProjectDir,
7171
gradleVersion,
7272
"testProjectAndroid:assembleDebug",
73-
"-Dorg.gradle.unsafe.instant-execution=true",
74-
"-Dorg.gradle.unsafe.instant-execution.fail-on-problems=false"
73+
"-Dorg.gradle.unsafe.configuration-cache=true"
7574
)
7675
when: "build is invoked"
7776
BuildResult result = runner.build()
@@ -86,7 +85,7 @@ class ProtobufAndroidPluginTest extends Specification {
8685
result = runner.build()
8786

8887
then: "it reuses the task graph"
89-
result.output.contains("Reusing instant execution cache")
88+
result.output.contains("Reusing configuration cache")
9089

9190
and: "it is up to date"
9291
result.task(":testProjectAndroid:assembleDebug").outcome == TaskOutcome.UP_TO_DATE
@@ -96,8 +95,7 @@ class ProtobufAndroidPluginTest extends Specification {
9695
mainProjectDir,
9796
gradleVersion,
9897
"testProjectAndroid:clean",
99-
"-Dorg.gradle.unsafe.instant-execution=true",
100-
"-Dorg.gradle.unsafe.instant-execution.fail-on-problems=false"
98+
"-Dorg.gradle.unsafe.configuration-cache=true"
10199
)
102100
result = runner.build()
103101

src/test/groovy/com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ class ProtobufJavaPluginTest extends Specification {
9393
.withProjectDir(projectDir)
9494
.withArguments(
9595
'build', '--stacktrace',
96-
'--configuration-cache',
97-
'--configuration-cache-problems=warn'
96+
'--configuration-cache'
9897
)
9998
.withPluginClasspath()
10099
.withGradleVersion(gradleVersion)

0 commit comments

Comments
 (0)