Skip to content

Commit

Permalink
Merge pull request #21 from gradle/lptr/support-android-3.1.0-alpha05
Browse files Browse the repository at this point in the history
Support Android 3.1.0-alpha05
  • Loading branch information
lptr authored Dec 6, 2017
2 parents eccf668 + 936464e commit 137d3c1
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ version = ["git", "describe", "--match", "[0-9]*", "--dirty"].execute().text.tri

// Maps supported Android plugin versions to the versions of Gradle that should support it
def supportedVersions = [
"3.1.0-alpha04": ["4.4-rc-4"],
"3.0.0": ["4.1", "4.2", "4.2.1", "4.3", "4.3.1", "4.4-rc-4"],
"3.0.1": ["4.1", "4.2", "4.2.1", "4.3", "4.3.1", "4.4-rc-4"],
"3.1.0-alpha05": ["4.4"],
"3.0.0": ["4.1", "4.2", "4.2.1", "4.3", "4.3.1", "4.4"],
"3.0.1": ["4.1", "4.2", "4.2.1", "4.3", "4.3.1", "4.4"],
]

repositories {
Expand All @@ -33,7 +33,7 @@ repositories {
}

dependencies {
compile 'com.android.tools.build:gradle:3.0.0'
compile 'com.android.tools.build:gradle:3.1.0-alpha05'
compile gradleApi()
testCompile gradleTestKit()
testCompile "junit:junit:4.12"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class AndroidCacheFixPlugin implements Plugin<Project> {
/**
* {@link com.android.build.gradle.internal.tasks.CheckManifest#getManifest()} should not be an {@literal @}{@link org.gradle.api.tasks.Input}.
*/
@AndroidIssue(introducedIn = "3.0.0", link = "https://issuetracker.google.com/issues/68772035")
@AndroidIssue(introducedIn = "3.0.0", fixedIn = "3.1.0-alpha05", link = "https://issuetracker.google.com/issues/68772035")
static class CheckManifest_Manifest_Workaround implements Workaround {
@CompileStatic(TypeCheckingMode.SKIP)
@Override
Expand Down
23 changes: 16 additions & 7 deletions src/test/groovy/org/gradle/android/RelocationTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,17 @@ class RelocationTest extends AbstractTest {
}

private static ExpectedResults expectedResults(VersionNumber androidVersion, GradleVersion gradleVersion) {
def isAndroid30x = androidVersion <= android("3.0.1")
def builder = ImmutableMap.<String, TaskOutcome>builder()
builder.put(':app:assemble', SUCCESS)
builder.put(':app:assembleDebug', SUCCESS)
builder.put(':app:assembleRelease', SUCCESS)
builder.put(':app:checkDebugManifest', FROM_CACHE)
builder.put(':app:checkReleaseManifest', FROM_CACHE)
builder.put(':app:checkDebugManifest', isAndroid30x
? FROM_CACHE
: SUCCESS)
builder.put(':app:checkReleaseManifest', isAndroid30x
? FROM_CACHE
: SUCCESS)
builder.put(':app:compileDebugAidl', FROM_CACHE)
builder.put(':app:compileDebugJavaWithJavac', FROM_CACHE)
builder.put(':app:compileDebugNdk', NO_SOURCE)
Expand Down Expand Up @@ -141,7 +146,7 @@ class RelocationTest extends AbstractTest {
builder.put(':app:splitsDiscoveryTaskRelease', FROM_CACHE)
builder.put(':app:transformClassesWithDexBuilderForDebug', SUCCESS)

if (androidVersion <= android("3.0.1")) {
if (isAndroid30x) {
builder.put(':app:transformClassesWithPreDexForRelease', SUCCESS)
builder.put(':app:transformDexWithDexForRelease', SUCCESS)
} else {
Expand All @@ -166,8 +171,12 @@ class RelocationTest extends AbstractTest {
builder.put(':library:assembleRelease', SUCCESS)
builder.put(':library:bundleDebug', SUCCESS)
builder.put(':library:bundleRelease', SUCCESS)
builder.put(':library:checkDebugManifest', FROM_CACHE)
builder.put(':library:checkReleaseManifest', FROM_CACHE)
builder.put(':library:checkDebugManifest', isAndroid30x
? FROM_CACHE
: SUCCESS)
builder.put(':library:checkReleaseManifest', isAndroid30x
? FROM_CACHE
: SUCCESS)
builder.put(':library:compileDebugAidl', FROM_CACHE)
builder.put(':library:compileDebugJavaWithJavac', FROM_CACHE)
builder.put(':library:compileDebugNdk', NO_SOURCE)
Expand Down Expand Up @@ -198,7 +207,7 @@ class RelocationTest extends AbstractTest {
builder.put(':library:javaPreCompileDebug', FROM_CACHE)
builder.put(':library:javaPreCompileRelease', FROM_CACHE)

if (androidVersion <= android("3.0.1")) {
if (isAndroid30x) {
builder.put(':library:mergeDebugAssets', FROM_CACHE)
builder.put(':library:mergeReleaseAssets', FROM_CACHE)
// TODO This produces overlapping outputs in build/intermediates/typedefs.txt
Expand Down Expand Up @@ -230,7 +239,7 @@ class RelocationTest extends AbstractTest {
builder.put(':library:processDebugJavaRes', NO_SOURCE)
builder.put(':library:processDebugManifest', FROM_CACHE)

if (androidVersion <= android("3.1.0-alpha01")) {
if (isAndroid30x) {
builder.put(':library:processDebugResources', FROM_CACHE)
builder.put(':library:processReleaseResources', FROM_CACHE)
} else {
Expand Down
1 change: 1 addition & 0 deletions src/test/groovy/org/gradle/android/WorkaroundTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ class WorkaroundTest extends Specification {
"3.1.0-alpha02" | ["AndroidJavaCompile_BootClasspath", "AndroidJavaCompile_AnnotationProcessorSource", "CombinedInput", "CheckManifest_Manifest"]
"3.1.0-alpha03" | ["AndroidJavaCompile_BootClasspath", "AndroidJavaCompile_AnnotationProcessorSource", "CombinedInput", "CheckManifest_Manifest"]
"3.1.0-alpha04" | ["AndroidJavaCompile_BootClasspath", "AndroidJavaCompile_AnnotationProcessorSource", "CheckManifest_Manifest"]
"3.1.0-alpha05" | ["AndroidJavaCompile_BootClasspath", "AndroidJavaCompile_AnnotationProcessorSource"]
}
}

0 comments on commit 137d3c1

Please sign in to comment.