Skip to content

Commit

Permalink
Android Gradle Plugin 7.3 Alpha (#210)
Browse files Browse the repository at this point in the history
* Add AGP 7.3 versions
* Use latest stable build tools
* Keep building a stabler version
  • Loading branch information
TWiStErRob authored Feb 18, 2022
1 parent 8882ff8 commit 8b6a2f5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 16 deletions.
60 changes: 47 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ jobs:
# AGP's com.android.SdkConstants.CURRENT_BUILD_TOOLS_VERSION
echo sdkmanager --install "build-tools;${{ matrix.build-tools }}"
sdkmanager --install "build-tools;${{ matrix.build-tools }}"
# Patch AGP 4.x v SDK Build Tools 31/32 incompatibility: https://stackoverflow.com/a/68430992/253468
# Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.
# Build-tool 32.0.0 is missing DX at /usr/local/lib/android/sdk/build-tools/32.0.0/dx
echo "Symlinking ${ANDROID_HOME}/build-tools/${{ matrix.build-tools }}/dx <- d8 and same for lib/dx.jar <- d8.jar."
test -e ${ANDROID_HOME}/build-tools/${{ matrix.build-tools }}/dx \
|| ln --symbolic --verbose d8 ${ANDROID_HOME}/build-tools/${{ matrix.build-tools }}/dx
test -e ${ANDROID_HOME}/build-tools/${{ matrix.build-tools }}/lib/dx.jar \
|| ln --symbolic --verbose d8.jar ${ANDROID_HOME}/build-tools/${{ matrix.build-tools }}/lib/dx.jar
# InstantAppExtension overrides compileSdkVersion, see android-all_kinds/build.gradle
echo sdkmanager --install "platforms;android-${{ matrix.instant-api }}"
Expand Down Expand Up @@ -369,7 +377,7 @@ jobs:
gradle: 6.1.1
gradle-java: 8
agp: 4.0.2
build-tools: 29.0.2
build-tools: 32.0.0
instant-api: 29
test-task: testReport :plugin:tests
- name: "AGP 4.0.x on Gradle 6.x"
Expand All @@ -383,7 +391,7 @@ jobs:
gradle: 6.7.1
gradle-java: 8
agp: 4.0.2
build-tools: 29.0.2
build-tools: 32.0.0
instant-api: 29
test-task: testReport :plugin:tests
- name: "AGP 4.1.x on Gradle 6.5+"
Expand All @@ -397,7 +405,7 @@ jobs:
gradle: 6.5.1
gradle-java: 8
agp: 4.1.3
build-tools: 29.0.2
build-tools: 32.0.0
instant-api: 29
test-task: testReport :plugin:tests
- name: "AGP 4.1.x on Gradle 6.x"
Expand All @@ -411,7 +419,7 @@ jobs:
gradle: 6.7.1
gradle-java: 8
agp: 4.1.3
build-tools: 29.0.2
build-tools: 32.0.0
instant-api: 29
test-task: testReport :plugin:tests
- name: "AGP 4.2.x on Gradle 6.7.1+"
Expand All @@ -425,7 +433,7 @@ jobs:
gradle: 6.7.1
gradle-java: 8
agp: 4.2.2
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 4.2.x on Gradle 6.x"
Expand All @@ -439,7 +447,7 @@ jobs:
gradle: 6.9.1
gradle-java: 8
agp: 4.2.2
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 4.2.x on Gradle 7.x"
Expand All @@ -453,7 +461,7 @@ jobs:
gradle: 7.4
gradle-java: 8
agp: 4.2.2
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
# From AGP 7 onwards it requires JDK 11 for Gradle to run on.
Expand All @@ -471,7 +479,7 @@ jobs:
gradle: 7.0.2
gradle-java: 11
agp: 7.0.3
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.0.x on Gradle 7.x"
Expand All @@ -485,7 +493,7 @@ jobs:
gradle: 7.4
gradle-java: 11
agp: 7.0.3
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.1.x on Gradle 7.2+"
Expand All @@ -499,7 +507,7 @@ jobs:
gradle: 7.2
gradle-java: 11
agp: 7.1.1
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.1.x on Gradle 7.x"
Expand All @@ -513,7 +521,7 @@ jobs:
gradle: 7.4
gradle-java: 11
agp: 7.1.1
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.2.x on Gradle 7.3+"
Expand All @@ -527,7 +535,7 @@ jobs:
gradle: 7.3.3
gradle-java: 11
agp: 7.2.0-beta02
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.2.x on Gradle 7.x"
Expand All @@ -541,7 +549,21 @@ jobs:
gradle: 7.4
gradle-java: 11
agp: 7.2.0-beta02
build-tools: 30.0.2
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests
- name: "AGP 7.3.x on Gradle 7.4+"
gradle: 7.4
gradle-java: 11
agp: 7.3.0-alpha03
build-tools: 30.0.3
instant-api: 30
test-task: testReport :quality:tests
- name: "AGP 7.3.x on Gradle 7.4+ - plugin"
gradle: 7.4
gradle-java: 11
agp: 7.3.0-alpha03
build-tools: 32.0.0
instant-api: 30
test-task: testReport :plugin:tests

Expand Down Expand Up @@ -774,6 +796,18 @@ jobs:
name: AGP 7.2.x on Gradle 7.x - plugin (7.2.0-beta02 on 7.4) Test Results XMLs
path: artifacts/AGP 7.2.x on Gradle 7.x - plugin (7.2.0-beta02 on 7.4) Test Results XMLs

- name: Download 'AGP 7.3.x on Gradle 7.4+ (7.3.0-alpha03 on 7.4) Test Results XMLs'
uses: actions/download-artifact@v2
with:
name: AGP 7.3.x on Gradle 7.4+ (7.3.0-alpha03 on 7.4) Test Results XMLs
path: artifacts/AGP 7.3.x on Gradle 7.4+ (7.3.0-alpha03 on 7.4) Test Results XMLs

- name: Download 'AGP 7.3.x on Gradle 7.4+ - plugin (7.3.0-alpha03 on 7.4) Test Results XMLs'
uses: actions/download-artifact@v2
with:
name: AGP 7.3.x on Gradle 7.4+ - plugin (7.3.0-alpha03 on 7.4) Test Results XMLs
path: artifacts/AGP 7.3.x on Gradle 7.4+ - plugin (7.3.0-alpha03 on 7.4) Test Results XMLs

#- name: Display structure of downloaded files
# run: ls -R
# working-directory: artifacts
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ projectVersion=0.14-SNAPSHOT
net.twisterrob.test.android.compileSdkVersion=android-30

# Default test substitutions (overridden by .github/workflows/ci.yml with -P)
net.twisterrob.test.android.pluginVersion=7.1.1
net.twisterrob.gradle.runner.gradleVersion=7.2
net.twisterrob.test.android.pluginVersion=7.2.0-beta02
net.twisterrob.gradle.runner.gradleVersion=7.4


# Build configuration defaults.
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ android-gradle-v42x = { module = "com.android.tools.build:gradle", version = "4.
android-gradle-v70x = { module = "com.android.tools.build:gradle", version = "7.0.3" }
android-gradle-v71x = { module = "com.android.tools.build:gradle", version = "7.1.1" }
android-gradle-v72x = { module = "com.android.tools.build:gradle", version = "7.2.0-beta02" }
android-gradle-v73x = { module = "com.android.tools.build:gradle", version = "7.3.0-alpha03" }
android-lint-main = { module = "com.android.tools.lint:lint", version.ref = "lint" }
android-lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" }
android-lint-gradle = { module = "com.android.tools.lint:lint-gradle", version.ref = "lint" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ const val VERSION_SDK_COMPILE_NAME: String = "11" // Android 11 (R)
/**
* Latest build tools version available, there's no reason to hold back.
*/
const val VERSION_BUILD_TOOLS: String = "30.0.2"
const val VERSION_BUILD_TOOLS: String = "32.0.0"

0 comments on commit 8b6a2f5

Please sign in to comment.