From a8a061b4e572703c18c69e4fc4afa0a9bada07cd Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Wed, 10 Feb 2021 00:41:29 -0800 Subject: [PATCH 1/5] Bump osdetector plugin version to 1.7.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 07166569..90903743 100644 --- a/build.gradle +++ b/build.gradle @@ -56,7 +56,7 @@ dependencies { compileOnly "com.android.tools.build:gradle:3.5.0" compile 'com.google.guava:guava:27.0.1-jre' - compile 'com.google.gradle:osdetector-gradle-plugin:1.6.2' + compile 'com.google.gradle:osdetector-gradle-plugin:1.7.0' compile 'commons-lang:commons-lang:2.6' testCompile 'junit:junit:4.12' From ecb37174cdf071548567101636e40e608a833f34 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Wed, 10 Feb 2021 00:43:45 -0800 Subject: [PATCH 2/5] Remove flag for ignoring configuration cache problems in Java build test. --- .../com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/groovy/com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy b/src/test/groovy/com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy index 0ce9b0e7..71f6b1ed 100644 --- a/src/test/groovy/com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy +++ b/src/test/groovy/com/google/protobuf/gradle/ProtobufJavaPluginTest.groovy @@ -93,8 +93,7 @@ class ProtobufJavaPluginTest extends Specification { .withProjectDir(projectDir) .withArguments( 'build', '--stacktrace', - '--configuration-cache', - '--configuration-cache-problems=warn' + '--configuration-cache' ) .withPluginClasspath() .withGradleVersion(gradleVersion) From 87ed3ec5de6a5c19224f32e02be1afb61c118a97 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Wed, 10 Feb 2021 00:44:19 -0800 Subject: [PATCH 3/5] Update Android build configuration cache test. --- .../gradle/ProtobufAndroidPluginTest.groovy | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy index d4e31bf2..fef3e2fe 100644 --- a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy +++ b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy @@ -15,8 +15,8 @@ import spock.lang.Unroll */ @CompileDynamic class ProtobufAndroidPluginTest extends Specification { - private static final List GRADLE_VERSION = ["5.6", "6.5-milestone-1"] - private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0-alpha10"] + private static final List GRADLE_VERSION = ["5.6", "6.5", "6.7"] + private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-alpha06"] @Unroll void "testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]"() { @@ -70,8 +70,8 @@ class ProtobufAndroidPluginTest extends Specification { mainProjectDir, gradleVersion, "testProjectAndroid:assembleDebug", - "-Dorg.gradle.unsafe.instant-execution=true", - "-Dorg.gradle.unsafe.instant-execution.fail-on-problems=false" + "-Dorg.gradle.unsafe.configuration-cache=true", + "-Dorg.gradle.unsafe.configuration-cache-problems=warn" ) when: "build is invoked" BuildResult result = runner.build() @@ -86,7 +86,7 @@ class ProtobufAndroidPluginTest extends Specification { result = runner.build() then: "it reuses the task graph" - result.output.contains("Reusing instant execution cache") + result.output.contains("Reusing configuration cache") and: "it is up to date" result.task(":testProjectAndroid:assembleDebug").outcome == TaskOutcome.UP_TO_DATE @@ -96,8 +96,8 @@ class ProtobufAndroidPluginTest extends Specification { mainProjectDir, gradleVersion, "testProjectAndroid:clean", - "-Dorg.gradle.unsafe.instant-execution=true", - "-Dorg.gradle.unsafe.instant-execution.fail-on-problems=false" + "-Dorg.gradle.unsafe.configuration-cache=true", + "-Dorg.gradle.unsafe.configuration-cache-problems=warn" ) result = runner.build() From fb9bc32449e65344e3e70413bf28430f034ec6c8 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Wed, 10 Feb 2021 11:14:16 -0800 Subject: [PATCH 4/5] Use newer version of AGP for configuration cache android test. --- .travis.yml | 1 + .../protobuf/gradle/ProtobufAndroidPluginTest.groovy | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 32bdf0d1..8d6b1a7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ android: - build-tools-27.0.3 - build-tools-28.0.3 - build-tools-29.0.2 + - build-tools-30.0.2 - android-26 - extra-android-support - extra-android-m2repository diff --git a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy index fef3e2fe..1e7e8e8c 100644 --- a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy +++ b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy @@ -15,8 +15,8 @@ import spock.lang.Unroll */ @CompileDynamic class ProtobufAndroidPluginTest extends Specification { - private static final List GRADLE_VERSION = ["5.6", "6.5", "6.7"] - private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-alpha06"] + private static final List GRADLE_VERSION = ["5.6", "6.5", "6.8"] + private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-beta04"] @Unroll void "testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]"() { @@ -70,8 +70,7 @@ class ProtobufAndroidPluginTest extends Specification { mainProjectDir, gradleVersion, "testProjectAndroid:assembleDebug", - "-Dorg.gradle.unsafe.configuration-cache=true", - "-Dorg.gradle.unsafe.configuration-cache-problems=warn" + "-Dorg.gradle.unsafe.configuration-cache=true" ) when: "build is invoked" BuildResult result = runner.build() @@ -96,8 +95,7 @@ class ProtobufAndroidPluginTest extends Specification { mainProjectDir, gradleVersion, "testProjectAndroid:clean", - "-Dorg.gradle.unsafe.configuration-cache=true", - "-Dorg.gradle.unsafe.configuration-cache-problems=warn" + "-Dorg.gradle.unsafe.configuration-cache=true" ) result = runner.build() From 83be640b20cc423fc2b2b087f58da2e1166354c2 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Wed, 10 Feb 2021 12:35:49 -0800 Subject: [PATCH 5/5] Lower AGP version as build-tool 30.0.2 hasn't been officially released. --- .travis.yml | 1 - .../com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d6b1a7d..32bdf0d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ android: - build-tools-27.0.3 - build-tools-28.0.3 - build-tools-29.0.2 - - build-tools-30.0.2 - android-26 - extra-android-support - extra-android-m2repository diff --git a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy index 1e7e8e8c..348111a0 100644 --- a/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy +++ b/src/test/groovy/com/google/protobuf/gradle/ProtobufAndroidPluginTest.groovy @@ -16,7 +16,7 @@ import spock.lang.Unroll @CompileDynamic class ProtobufAndroidPluginTest extends Specification { private static final List GRADLE_VERSION = ["5.6", "6.5", "6.8"] - private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-beta04"] + private static final List ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-alpha10"] @Unroll void "testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]"() {