[#711] Android Gradle Plugin 7.3

This commit is contained in:
Carter Jernigan 2022-09-19 08:06:15 -04:00 committed by Carter Jernigan
parent ee23eaebae
commit 0873ae73e1
12 changed files with 105 additions and 90 deletions

View File

@ -1,69 +1,62 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
androidx.databinding:databinding-common:7.2.2=runtimeClasspath
androidx.databinding:databinding-compiler-common:7.2.2=runtimeClasspath
com.android.databinding:baseLibrary:7.2.2=runtimeClasspath
com.android.tools.analytics-library:crash:30.2.2=runtimeClasspath
com.android.tools.analytics-library:protos:30.2.2=runtimeClasspath
com.android.tools.analytics-library:shared:30.2.2=runtimeClasspath
com.android.tools.analytics-library:tracker:30.2.2=runtimeClasspath
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=runtimeClasspath
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=runtimeClasspath
com.android.tools.build:aapt2-proto:7.2.2-7984345=runtimeClasspath
com.android.tools.build:aaptcompiler:7.2.2=runtimeClasspath
com.android.tools.build:apksig:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:apkzlib:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:builder-model:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:builder-test-api:7.2.2=runtimeClasspath
com.android.tools.build:builder:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:bundletool:1.8.2=runtimeClasspath
com.android.tools.build:gradle-api:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:gradle:7.2.2=compileClasspath,runtimeClasspath
com.android.tools.build:manifest-merger:30.2.2=compileClasspath,runtimeClasspath
androidx.databinding:databinding-common:7.3.0=runtimeClasspath
androidx.databinding:databinding-compiler-common:7.3.0=runtimeClasspath
com.android.databinding:baseLibrary:7.3.0=runtimeClasspath
com.android.tools.analytics-library:crash:30.3.0=runtimeClasspath
com.android.tools.analytics-library:protos:30.3.0=runtimeClasspath
com.android.tools.analytics-library:shared:30.3.0=runtimeClasspath
com.android.tools.analytics-library:tracker:30.3.0=runtimeClasspath
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10=runtimeClasspath
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10=runtimeClasspath
com.android.tools.build:aapt2-proto:7.3.0-8691043=runtimeClasspath
com.android.tools.build:aaptcompiler:7.3.0=runtimeClasspath
com.android.tools.build:apksig:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:apkzlib:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:builder-model:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:builder-test-api:7.3.0=runtimeClasspath
com.android.tools.build:builder:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:bundletool:1.9.0=runtimeClasspath
com.android.tools.build:gradle-api:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:gradle:7.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:manifest-merger:30.3.0=compileClasspath,runtimeClasspath
com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=runtimeClasspath
com.android.tools.ddms:ddmlib:30.2.2=runtimeClasspath
com.android.tools.layoutlib:layoutlib-api:30.2.2=runtimeClasspath
com.android.tools.lint:lint-model:30.2.2=runtimeClasspath
com.android.tools.lint:lint-typedef-remover:30.2.2=runtimeClasspath
com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.2=runtimeClasspath
com.android.tools.utp:android-device-provider-gradle-proto:30.2.2=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.2=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.2=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.2=runtimeClasspath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.2=runtimeClasspath
com.android.tools:annotations:30.2.2=runtimeClasspath
com.android.tools:common:30.2.2=runtimeClasspath
com.android.tools:dvlib:30.2.2=runtimeClasspath
com.android.tools:repository:30.2.2=runtimeClasspath
com.android.tools:sdk-common:30.2.2=runtimeClasspath
com.android.tools:sdklib:30.2.2=runtimeClasspath
com.android:signflinger:7.2.2=runtimeClasspath
com.android:zipflinger:7.2.2=compileClasspath,runtimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.11.1=runtimeClasspath
com.fasterxml.jackson.core:jackson-core:2.11.1=runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.11.1=runtimeClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.1=runtimeClasspath
com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1=runtimeClasspath
com.fasterxml.woodstox:woodstox-core:6.2.1=runtimeClasspath
com.android.tools.ddms:ddmlib:30.3.0=runtimeClasspath
com.android.tools.layoutlib:layoutlib-api:30.3.0=runtimeClasspath
com.android.tools.lint:lint-model:30.3.0=runtimeClasspath
com.android.tools.lint:lint-typedef-remover:30.3.0=runtimeClasspath
com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.0=runtimeClasspath
com.android.tools.utp:android-device-provider-gradle-proto:30.3.0=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.0=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.3.0=runtimeClasspath
com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.0=runtimeClasspath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.0=runtimeClasspath
com.android.tools:annotations:30.3.0=runtimeClasspath
com.android.tools:common:30.3.0=runtimeClasspath
com.android.tools:dvlib:30.3.0=runtimeClasspath
com.android.tools:repository:30.3.0=runtimeClasspath
com.android.tools:sdk-common:30.3.0=runtimeClasspath
com.android.tools:sdklib:30.3.0=runtimeClasspath
com.android:signflinger:7.3.0=runtimeClasspath
com.android:zipflinger:7.3.0=compileClasspath,runtimeClasspath
com.github.gundy:semver4j:0.16.4=runtimeClasspath
com.google.android:annotations:4.1.1.4=runtimeClasspath
com.google.api.grpc:proto-google-common-protos:1.12.0=runtimeClasspath
com.google.api.grpc:proto-google-common-protos:2.0.1=runtimeClasspath
com.google.auto.value:auto-value-annotations:1.6.2=runtimeClasspath
com.google.code.findbugs:jsr305:3.0.2=runtimeClasspath
com.google.code.gson:gson:2.8.9=runtimeClasspath
com.google.crypto.tink:tink:1.3.0-rc2=runtimeClasspath
com.google.dagger:dagger:2.28.3=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.3.4=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.4.0=runtimeClasspath
com.google.flatbuffers:flatbuffers-java:1.12.0=runtimeClasspath
com.google.guava:failureaccess:1.0.1=runtimeClasspath
com.google.guava:guava:30.1-jre=runtimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=runtimeClasspath
com.google.j2objc:j2objc-annotations:1.3=runtimeClasspath
com.google.jimfs:jimfs:1.1=runtimeClasspath
com.google.protobuf:protobuf-java-util:3.10.0=runtimeClasspath
com.google.protobuf:protobuf-java:3.10.0=runtimeClasspath
com.google.protobuf:protobuf-java-util:3.17.2=runtimeClasspath
com.google.protobuf:protobuf-java:3.17.2=runtimeClasspath
com.google.testing.platform:core-proto:0.0.8-alpha07=runtimeClasspath
com.googlecode.json-simple:json-simple:1.1=runtimeClasspath
com.googlecode.juniversalchardet:juniversalchardet:1.0.3=runtimeClasspath
@ -77,47 +70,45 @@ commons-codec:commons-codec:1.11=runtimeClasspath
commons-io:commons-io:2.4=runtimeClasspath
commons-logging:commons-logging:1.2=runtimeClasspath
de.undercouch:gradle-download-task:4.1.1=runtimeClasspath
io.grpc:grpc-api:1.21.1=runtimeClasspath
io.grpc:grpc-context:1.21.1=runtimeClasspath
io.grpc:grpc-core:1.21.1=runtimeClasspath
io.grpc:grpc-netty:1.21.1=runtimeClasspath
io.grpc:grpc-protobuf-lite:1.21.1=runtimeClasspath
io.grpc:grpc-protobuf:1.21.1=runtimeClasspath
io.grpc:grpc-stub:1.21.1=runtimeClasspath
io.netty:netty-buffer:4.1.34.Final=runtimeClasspath
io.netty:netty-codec-http2:4.1.34.Final=runtimeClasspath
io.netty:netty-codec-http:4.1.34.Final=runtimeClasspath
io.netty:netty-codec-socks:4.1.34.Final=runtimeClasspath
io.netty:netty-codec:4.1.34.Final=runtimeClasspath
io.netty:netty-common:4.1.34.Final=runtimeClasspath
io.netty:netty-handler-proxy:4.1.34.Final=runtimeClasspath
io.netty:netty-handler:4.1.34.Final=runtimeClasspath
io.netty:netty-resolver:4.1.34.Final=runtimeClasspath
io.netty:netty-transport:4.1.34.Final=runtimeClasspath
io.opencensus:opencensus-api:0.21.0=runtimeClasspath
io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=runtimeClasspath
io.grpc:grpc-api:1.39.0=runtimeClasspath
io.grpc:grpc-context:1.39.0=runtimeClasspath
io.grpc:grpc-core:1.39.0=runtimeClasspath
io.grpc:grpc-netty:1.39.0=runtimeClasspath
io.grpc:grpc-protobuf-lite:1.39.0=runtimeClasspath
io.grpc:grpc-protobuf:1.39.0=runtimeClasspath
io.grpc:grpc-stub:1.39.0=runtimeClasspath
io.netty:netty-buffer:4.1.52.Final=runtimeClasspath
io.netty:netty-codec-http2:4.1.52.Final=runtimeClasspath
io.netty:netty-codec-http:4.1.52.Final=runtimeClasspath
io.netty:netty-codec-socks:4.1.52.Final=runtimeClasspath
io.netty:netty-codec:4.1.52.Final=runtimeClasspath
io.netty:netty-common:4.1.52.Final=runtimeClasspath
io.netty:netty-handler-proxy:4.1.52.Final=runtimeClasspath
io.netty:netty-handler:4.1.52.Final=runtimeClasspath
io.netty:netty-resolver:4.1.52.Final=runtimeClasspath
io.netty:netty-transport:4.1.52.Final=runtimeClasspath
io.perfmark:perfmark-api:0.23.0=runtimeClasspath
it.unimi.dsi:fastutil:8.4.0=runtimeClasspath
jakarta.activation:jakarta.activation-api:1.2.1=runtimeClasspath
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=runtimeClasspath
javax.annotation:javax.annotation-api:1.3.2=runtimeClasspath
javax.inject:javax.inject:1=runtimeClasspath
net.java.dev.jna:jna-platform:5.6.0=runtimeClasspath
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,runtimeClasspath
net.sf.jopt-simple:jopt-simple:4.9=runtimeClasspath
net.sf.kxml:kxml2:2.3.0=runtimeClasspath
org.apache.commons:commons-compress:1.20=runtimeClasspath
org.apache.httpcomponents:httpclient:4.5.9=runtimeClasspath
org.apache.httpcomponents:httpcore:4.4.11=runtimeClasspath
org.apache.httpcomponents:httpclient:4.5.13=runtimeClasspath
org.apache.httpcomponents:httpcore:4.4.13=runtimeClasspath
org.apache.httpcomponents:httpmime:4.5.6=runtimeClasspath
org.bitbucket.b_c:jose4j:0.7.0=runtimeClasspath
org.bouncycastle:bcpkix-jdk15on:1.56=runtimeClasspath
org.bouncycastle:bcprov-jdk15on:1.56=runtimeClasspath
org.bouncycastle:bcpkix-jdk15on:1.67=runtimeClasspath
org.bouncycastle:bcprov-jdk15on:1.67=runtimeClasspath
org.checkerframework:checker-qual:3.5.0=runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.17=runtimeClasspath
org.codehaus.woodstox:stax2-api:4.2.1=runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.19=runtimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.2=runtimeClasspath
org.glassfish.jaxb:txw2:2.3.2=runtimeClasspath
org.jdom:jdom2:2.0.6=runtimeClasspath
org.jetbrains.dokka:dokka-core:1.4.32=runtimeClasspath
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,runtimeClasspath
org.jetbrains.kotlin:kotlin-android-extensions:1.7.10=runtimeClasspath
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.10=runtimeClasspath
@ -165,12 +156,8 @@ org.jetbrains.kotlin:kotlin-util-io:1.6.21=kotlinCompilerPluginClasspathMain
org.jetbrains.kotlin:kotlin-util-io:1.7.10=compileClasspath,runtimeClasspath
org.jetbrains.kotlin:kotlin-util-klib:1.7.10=runtimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=runtimeClasspath
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1=runtimeClasspath
org.jetbrains:annotations:13.0=compileClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,runtimeClasspath
org.jetbrains:markdown-jvm:0.2.1=runtimeClasspath
org.jetbrains:markdown:0.2.1=runtimeClasspath
org.json:json:20180813=runtimeClasspath
org.jsoup:jsoup:1.13.1=runtimeClasspath
org.jvnet.staxex:stax-ex:1.8.1=runtimeClasspath
org.ow2.asm:asm-analysis:9.1=runtimeClasspath
org.ow2.asm:asm-commons:9.1=runtimeClasspath

View File

@ -1,4 +1,5 @@
import com.android.build.api.dsl.CommonExtension
import com.android.build.api.dsl.ManagedVirtualDevice
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
pluginManager.withPlugin("com.android.application") {
@ -51,6 +52,7 @@ pluginManager.withPlugin("com.android.library") {
}
}
@Suppress("LongMethod")
fun com.android.build.gradle.BaseExtension.configureBaseExtension() {
compileSdkVersion(project.property("ANDROID_COMPILE_SDK_VERSION").toString().toInt())
ndkVersion = project.property("ANDROID_NDK_VERSION").toString()
@ -85,6 +87,29 @@ fun com.android.build.gradle.BaseExtension.configureBaseExtension() {
if (project.property("IS_USE_TEST_ORCHESTRATOR").toString().toBoolean()) {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
@Suppress("UnstableApiUsage")
managedDevices {
@Suppress("MagicNumber", "PropertyName", "VariableNaming")
val MANAGED_DEVICES_MIN_SDK = 27
val testDeviceMinSdkVersion = project.properties["ANDROID_MIN_SDK_VERSION"]
.toString().toInt().coerceAtLeast(MANAGED_DEVICES_MIN_SDK)
val testDeviceMaxSdkVersion = project.properties["ANDROID_TARGET_SDK_VERSION"].toString().toInt()
devices {
create<ManagedVirtualDevice>("pixel2Min") {
device = "Pixel 2"
apiLevel = testDeviceMinSdkVersion
systemImageSource = "aosp"
}
create<ManagedVirtualDevice>("pixel2Target") {
device = "Pixel 2"
apiLevel = testDeviceMaxSdkVersion
systemImageSource = "aosp"
}
}
}
}
if (this is CommonExtension<*, *, *, *>) {

View File

@ -6,6 +6,8 @@ plugins {
}
android {
namespace = "cash.z.ecc.android.sdk.darkside"
defaultConfig {
//targetSdk = 30 //Integer.parseInt(project.property("targetSdkVersion"))
multiDexEnabled = true

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.android.sdk.darkside">
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- For code coverage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.android.sdk.darkside">
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:name="androidx.multidex.MultiDexApplication" />
</manifest>

View File

@ -8,6 +8,8 @@ plugins {
}
android {
namespace = "cash.z.ecc.android.sdk.demoapp"
defaultConfig {
applicationId = "cash.z.ecc.android.sdk.demoapp"
minSdk = 19

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.android.sdk.demoapp">
xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name=".App"

View File

@ -97,6 +97,8 @@ A variety of Gradle tasks are set up within the project, and these tasks are als
* `lint` - Performs static analysis with Android lint
* `dependencyUpdates` - Checks for available dependency updates. It will only suggest final releases, unless a particular dependency is already using a non-final release (e.g. alpha, beta, RC).
Gradle Managed Devices are also configured with our build scripts. We have found best results running tests one module at a time, rather than trying to run them all at once. For example: `./gradlew :sdk-lib:pixel2TargetDebugAndroidTest` will run the SDK tests on a Pixel 2 sized device using our target API version.
## Gradle Properties
A variety of Gradle properties can be used to configure the build. Most of these properties are optional and help with advanced configuration. If you're just doing local development or making a small pull request contribution, you likely do not need to worry about these.

View File

@ -68,7 +68,7 @@ ANDROID_COMPILE_SDK_VERSION=33
# When changing this, be sure to update .github/actions/setup/action.yml
ANDROID_NDK_VERSION=22.1.7171670
ANDROID_GRADLE_PLUGIN_VERSION=7.2.2
ANDROID_GRADLE_PLUGIN_VERSION=7.3.0
DETEKT_VERSION=1.21.0
DOKKA_VERSION=1.7.10
EMULATOR_WTF_GRADLE_PLUGIN_VERSION=0.0.10

View File

@ -119,6 +119,8 @@ signing {
}
android {
namespace = "cash.z.ecc.android.sdk"
useLibrary("android.test.runner")
defaultConfig {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.android.sdk">
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- For code coverage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

View File

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.android.sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>