Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully enable configuration cache test #467

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import spock.lang.Unroll
*/
@CompileDynamic
class ProtobufAndroidPluginTest extends Specification {
private static final List<String> GRADLE_VERSION = ["5.6", "6.5-milestone-1"]
private static final List<String> ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0-alpha10"]
private static final List<String> GRADLE_VERSION = ["5.6", "6.5", "6.8"]
private static final List<String> ANDROID_PLUGIN_VERSION = ["3.5.0", "4.1.0", "4.2.0-alpha10"]

@Unroll
void "testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]"() {
Expand Down Expand Up @@ -70,8 +70,7 @@ 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"
)
when: "build is invoked"
BuildResult result = runner.build()
Expand All @@ -86,7 +85,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
Expand All @@ -96,8 +95,7 @@ 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"
)
result = runner.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ class ProtobufJavaPluginTest extends Specification {
.withProjectDir(projectDir)
.withArguments(
'build', '--stacktrace',
'--configuration-cache',
'--configuration-cache-problems=warn'
'--configuration-cache'
)
.withPluginClasspath()
.withGradleVersion(gradleVersion)
Expand Down