Upgrade Android tools (#5533)

* Upgrade Android tools

NDK 24
AGP/Gradle 7.2
Kotlin 1.6.21
Coroutines 1.6.1

* Force Java 8 to run sdkmanager
This commit is contained in:
Romain Guy
2022-05-09 12:12:14 -07:00
committed by GitHub
parent bf34ee6e22
commit f229aaa7c4
39 changed files with 76 additions and 55 deletions

View File

@@ -81,10 +81,10 @@ buildscript {
'minSdk': 19,
'targetSdk': 31,
'compileSdk': 31,
'kotlin': '1.6.10',
'kotlin_coroutines': '1.6.0',
'kotlin': '1.6.21',
'kotlin_coroutines': '1.6.1',
'buildTools': '32.0.0',
'ndk': '23.1.7779620'
'ndk': '24.0.8215888'
]
ext.deps = [
@@ -101,7 +101,7 @@ buildscript {
dependencies {
// NOTE: See TODO in gradle.properties once we move to Gradle 7.4
classpath 'com.android.tools.build:gradle:7.1.1'
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}

View File

@@ -1,4 +1,3 @@
plugins {
id 'groovy-gradle-plugin'
}

View File

@@ -1,4 +1,6 @@
android {
namespace 'com.google.android.filament.filamat'
flavorDimensions "functionality"
productFlavors {
full {

View File

@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.filamat" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

View File

@@ -1,3 +1,7 @@
android {
namespace 'com.google.android.filament'
}
dependencies {
implementation deps.androidx.annotations
}

View File

@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

View File

@@ -1,6 +1,8 @@
apply plugin: 'kotlin-android'
android {
namespace 'com.google.android.filament.utils'
sourceSets {
main {
kotlin.srcDirs += "src/main/java"
@@ -10,14 +12,14 @@ android {
defaultConfig {
missingDimensionStrategy 'functionality', 'full'
}
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
packagingOptions {
exclude 'lib/*/libfilament-jni.so'
exclude 'lib/*/libgltfio-jni.so'
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
jniLibs {
excludes += ['lib/*/libfilament-jni.so', 'lib/*/libgltfio-jni.so']
}
}
}

View File

@@ -14,5 +14,4 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.utils" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

View File

@@ -1,4 +1,6 @@
android {
namespace 'com.google.android.filament.gltfio'
flavorDimensions "functionality"
productFlavors {
full {
@@ -15,13 +17,14 @@ android {
}
}
}
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
packagingOptions {
exclude 'lib/*/libfilament-jni.so'
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
jniLibs {
excludes += ['lib/*/libfilament-jni.so']
}
}
}

View File

@@ -14,5 +14,4 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.gltfio" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

View File

@@ -1,6 +1,6 @@
#Wed Nov 17 10:40:18 PST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -25,6 +25,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.gltf'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.gltf"
@@ -32,6 +34,7 @@ android {
targetSdkVersion versions.targetSdk
missingDimensionStrategy 'functionality', 'full'
}
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
// is not configuration-cache friendly yet; this is only useful for Play publication
dependenciesInfo {

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.gltf">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />

View File

@@ -16,6 +16,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.hellocam'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.hellocamera"

View File

@@ -16,8 +16,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.hellocam">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA" />

View File

@@ -16,6 +16,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.hellotriangle'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.hellotriangle"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.hellotriangle">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -22,6 +22,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.ibl'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.ibl"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.ibl">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />

View File

@@ -15,6 +15,8 @@ clean.doFirst {
delete "src/main/assets"
}
android {
namespace 'com.google.android.filament.litcube'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.litcube"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.litcube">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -4,6 +4,8 @@ apply plugin: 'kotlin-android'
project.ext.isSample = true
android {
namespace 'com.google.android.filament.livewallpaper'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.livewallpaper"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.livewallpaper">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.software.live_wallpaper" />

View File

@@ -19,6 +19,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.material_builder'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.material_builder"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.material_builder">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -15,6 +15,8 @@ clean.doFirst {
delete "src/main/assets"
}
android {
namespace 'com.google.android.filament.multiview'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.multiview"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.multiview">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -18,6 +18,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.pagecurl'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.pagecurl"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.pagecurl">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -16,6 +16,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.streamtest'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.streamtest"

View File

@@ -16,8 +16,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.streamtest">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -16,6 +16,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.textureview'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.textureview"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.textureview">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -22,6 +22,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.textured'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.textured"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.textured">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -16,6 +16,8 @@ clean.doFirst {
}
android {
namespace 'com.google.android.filament.transparentrendering'
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.textureview"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.filament.transparentrendering">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"

View File

@@ -49,7 +49,8 @@ FILAMENT_NDK_VERSION=${FILAMENT_NDK_VERSION:-$(cat `dirname $0`/ndk.version)}
# Install the required NDK version specifically (if not present)
if [[ ! -d "${ANDROID_HOME}/ndk/$FILAMENT_NDK_VERSION" ]]; then
${ANDROID_HOME}/tools/bin/sdkmanager "ndk;$FILAMENT_NDK_VERSION" > /dev/null
# NOTE: We MUST use Java 1.8 to run sdkmanager currently, it fails starting with Java 11
JAVA_HOME=${JAVA_HOME_8_X64} ${ANDROID_HOME}/tools/bin/sdkmanager "ndk;$FILAMENT_NDK_VERSION" > /dev/null
fi
# Only build 1 64 bit target during presubmit to cut down build times during presubmit

View File

@@ -1 +1 @@
23.1.7779620
24.0.8215888