Upgrade AGP (#4402)

* Upgrade AGP

* Request Java 11 to build Android artifacts with AGP 7.0

* Add distribution

* Use a cheaper method to pick Java 11
This commit is contained in:
Romain Guy
2021-07-28 15:43:03 -07:00
committed by GitHub
parent 8c36e6d95f
commit 2dadad1e87
4 changed files with 11 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ section below.
To build Filament for Android you must also install the following:
- Android Studio 4.2.0 or more recent
- Android Studio Arctic Fox or more recent
- Android SDK
- Android NDK "side-by-side" 22.1 or higher

View File

@@ -77,7 +77,7 @@ buildscript {
]
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -3,4 +3,12 @@
if [[ "$GITHUB_WORKFLOW" ]]; then
echo "Running workflow $GITHUB_WORKFLOW (event: $GITHUB_EVENT_NAME, action: $GITHUB_ACTION)"
CONTINUOUS_INTEGRATION=true
# Force Java to be Java 11 minimum, it defaults to 8 in GitHub runners for some platforms
export JAVA_HOME=${JAVA_HOME_11_X64}
java_version=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
if [[ "$java_version" < 11 ]]; then
echo "Android builds require Java 11, found version ${java_version} instead"
exit 0
fi
fi