Skip to content

Commit 41eea09

Browse files
authored
Merge pull request #113 from gradle/no/support-alpha
Add support for AGP 4.2.0-alpha07
2 parents ec86675 + de9ad7e commit 41eea09

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version = ["git", "describe", "--match", "[0-9]*", "--dirty"].execute().text.tri
2222

2323
// Maps supported Android plugin versions to the versions of Gradle that support it
2424
def supportedVersions = [
25-
"4.2.0-alpha05": ["6.5.1"],
25+
"4.2.0-alpha07": ["6.5.1"],
2626
"4.1.0-beta05": ["6.5.1"],
2727
"4.0.1": ["6.1.1", "6.3", "6.4.1"],
2828
"3.6.4": ["5.6.4", "6.3", "6.4.1"],

src/main/groovy/org/gradle/android/Versions.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class Versions {
4141

4242
static VersionNumber earliestMaybeSupportedAndroidVersion() {
4343
VersionNumber earliestSupported = SUPPORTED_ANDROID_VERSIONS.min()
44-
return new VersionNumber(earliestSupported.major, earliestSupported.minor, 0, null)
44+
// "alpha" is lower than null
45+
return new VersionNumber(earliestSupported.major, earliestSupported.minor, 0, "alpha")
4546
}
4647

4748
static VersionNumber latestAndroidVersion() {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.gradle.android
2+
3+
import org.junit.Assert
4+
import org.junit.Test
5+
6+
class VersionsTest {
7+
8+
@Test
9+
void "earliest supported version includes alpha and beta builds"() {
10+
def earliest = Versions.SUPPORTED_ANDROID_VERSIONS.min()
11+
def alphaOfEarliest = Versions.android("${earliest.major}.${earliest.minor}.0-alpha01")
12+
Assert.assertTrue(alphaOfEarliest >= Versions.earliestMaybeSupportedAndroidVersion())
13+
}
14+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class WorkaroundTest extends Specification {
1212
workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
1313
where:
1414
androidVersion | expectedWorkarounds
15-
"4.2.0-alpha05" | ['RoomSchemaLocation', 'CompileLibraryResources', 'MergeResources']
15+
"4.2.0-alpha07" | ['RoomSchemaLocation', 'CompileLibraryResources', 'MergeResources']
1616
"4.1.0-beta05" | ['RoomSchemaLocation', 'CompileLibraryResources', 'MergeResources']
1717
"4.0.1" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation', 'CompileLibraryResources', 'MergeResources']
1818
"3.6.4" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation']

0 commit comments

Comments
 (0)