Skip to content

Commit 4b13a36

Browse files
authored
Merge pull request #174 from gradle/no/update-4-and-7
Support AGP 4.2.2 and 7.0.0-beta05
2 parents ce77ded + a03f321 commit 4b13a36

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Some Android plugin versions have issues with Gradle's build cache feature. When applied to an Android project this plugin applies workarounds for these issues based on the Android plugin and Gradle versions.
77

88
* Supported Gradle versions: 5.4.1+
9-
* Supported Android Gradle Plugin versions: 3.5.4, 3.6.4, 4.0.1, 4.1.3, 4.2.1, 7.0.0-beta01
9+
* Supported Android Gradle Plugin versions: 3.5.4, 3.6.4, 4.0.1, 4.1.3, 4.2.2, 7.0.0-beta05
1010
* Supported Kotlin versions: 1.3.70+
1111

1212
We only test against the latest patch versions of each minor version of Android Gradle Plugin. This means that although it may work perfectly well with an older patch version (say 3.6.2), we do not test against these older patch versions, so the latest patch version is the only version from that minor release that we technically support.

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def isCI = (System.getenv('CI') ?: 'false').toBoolean()
1717

1818
// Maps supported Android plugin versions to the versions of Gradle that support it
1919
def supportedVersions = [
20-
"7.0.0-beta01": ["7.1.1"],
21-
"4.2.1": ["6.8.3", "7.1.1"],
20+
"7.0.0-beta05": ["7.1.1"],
21+
"4.2.2": ["6.8.3", "7.1.1"],
2222
"4.1.3": ["6.5.1", "6.8.3"],
2323
"4.0.2": ["6.1.1", "6.8.3"],
2424
"3.6.4": ["5.6.4", "6.8.3"],

src/test/groovy/org/gradle/android/CrossVersionOutcomeAndRelocationTest.groovy

+10
Original file line numberDiff line numberDiff line change
@@ -547,5 +547,15 @@ class CrossVersionOutcomeAndRelocationTest extends AbstractTest {
547547
builder.expect(':app:mergeReleaseResources', SUCCESS)
548548
builder.expect(':app:processDebugResources', SUCCESS)
549549
builder.expect(':app:processReleaseResources', SUCCESS)
550+
// New tasks in 7.0.0-beta04
551+
builder.expect(':library:javaPreCompileDebug', FROM_CACHE)
552+
builder.expect(':library:javaPreCompileRelease', FROM_CACHE)
553+
builder.expect(':app:javaPreCompileDebug', FROM_CACHE)
554+
builder.expect(':app:javaPreCompileRelease', FROM_CACHE)
555+
// New non-cacheable tasks in 7.0.0-beta05
556+
builder.expect(':app:mergeReleaseArtProfile', SUCCESS)
557+
builder.expect(':app:compileReleaseArtProfile', FROM_CACHE)
558+
builder.expect(':library:prepareReleaseArtProfile', SUCCESS)
559+
builder.expect(':library:prepareDebugArtProfile', SUCCESS)
550560
}
551561
}

src/test/groovy/org/gradle/android/RerunTasksTest.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ class RerunTasksTest extends AbstractTest {
1616
.build()
1717
.writeProject()
1818

19-
withGradleVersion("7.0")
19+
withGradleVersion(TestVersions.latestGradleVersion().version)
2020
.withProjectDir(projectDir)
2121
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache")
2222
.build()
2323

2424
when:
25-
def result = withGradleVersion("7.0")
25+
def result = withGradleVersion(TestVersions.latestGradleVersion().version)
2626
.withProjectDir(projectDir)
2727
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache")
2828
.build()

src/test/groovy/org/gradle/android/WorkaroundTest.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class WorkaroundTest extends Specification {
1212
workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
1313
where:
1414
androidVersion | expectedWorkarounds
15-
"7.0.0-beta01" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_7_0']
16-
"4.2.1" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_2', 'MergeResources']
15+
"7.0.0-beta05" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_7_0']
16+
"4.2.2" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_2', 'MergeResources']
1717
"4.1.3" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_0', 'MergeResources']
1818
"4.0.2" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_0', 'MergeResources']
1919
"3.6.4" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs']

0 commit comments

Comments
 (0)