Skip to content

Commit

Permalink
Merge pull request #174 from gradle/no/update-4-and-7
Browse files Browse the repository at this point in the history
Support AGP 4.2.2 and 7.0.0-beta05
  • Loading branch information
ghale authored Jul 9, 2021
2 parents ce77ded + a03f321 commit 4b13a36
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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.

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

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.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def isCI = (System.getenv('CI') ?: 'false').toBoolean()

// Maps supported Android plugin versions to the versions of Gradle that support it
def supportedVersions = [
"7.0.0-beta01": ["7.1.1"],
"4.2.1": ["6.8.3", "7.1.1"],
"7.0.0-beta05": ["7.1.1"],
"4.2.2": ["6.8.3", "7.1.1"],
"4.1.3": ["6.5.1", "6.8.3"],
"4.0.2": ["6.1.1", "6.8.3"],
"3.6.4": ["5.6.4", "6.8.3"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,5 +547,15 @@ class CrossVersionOutcomeAndRelocationTest extends AbstractTest {
builder.expect(':app:mergeReleaseResources', SUCCESS)
builder.expect(':app:processDebugResources', SUCCESS)
builder.expect(':app:processReleaseResources', SUCCESS)
// New tasks in 7.0.0-beta04
builder.expect(':library:javaPreCompileDebug', FROM_CACHE)
builder.expect(':library:javaPreCompileRelease', FROM_CACHE)
builder.expect(':app:javaPreCompileDebug', FROM_CACHE)
builder.expect(':app:javaPreCompileRelease', FROM_CACHE)
// New non-cacheable tasks in 7.0.0-beta05
builder.expect(':app:mergeReleaseArtProfile', SUCCESS)
builder.expect(':app:compileReleaseArtProfile', FROM_CACHE)
builder.expect(':library:prepareReleaseArtProfile', SUCCESS)
builder.expect(':library:prepareDebugArtProfile', SUCCESS)
}
}
4 changes: 2 additions & 2 deletions src/test/groovy/org/gradle/android/RerunTasksTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class RerunTasksTest extends AbstractTest {
.build()
.writeProject()

withGradleVersion("7.0")
withGradleVersion(TestVersions.latestGradleVersion().version)
.withProjectDir(projectDir)
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache")
.build()

when:
def result = withGradleVersion("7.0")
def result = withGradleVersion(TestVersions.latestGradleVersion().version)
.withProjectDir(projectDir)
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache")
.build()
Expand Down
4 changes: 2 additions & 2 deletions src/test/groovy/org/gradle/android/WorkaroundTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class WorkaroundTest extends Specification {
workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
where:
androidVersion | expectedWorkarounds
"7.0.0-beta01" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_7_0']
"4.2.1" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_2', 'MergeResources']
"7.0.0-beta05" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_7_0']
"4.2.2" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_2', 'MergeResources']
"4.1.3" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_0', 'MergeResources']
"4.0.2" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs', 'CompileLibraryResources_4_0', 'MergeResources']
"3.6.4" | ['MergeJavaResources', 'RoomSchemaLocation', 'StripDebugSymbols', 'MergeNativeLibs']
Expand Down

0 comments on commit 4b13a36

Please sign in to comment.