Update Android minSdkVersion to 21 (#142267)
This PR increases Android's `minSdkVersion` to 21. There are two changes in this PR aside from simply increasing the number from 19 to 21 everywhere. First, tests using `flutter_gallery` fail without updating the lockfiles. The changes in the PR are the results of running `dev/tools/bin/generate_gradle_lockfiles.dart` on that app. Second, from [here](https://developer.android.com/build/multidex#mdex-pre-l): > if your minSdkVersion is 21 or higher, multidex is enabled by default and you don't need the multidex library. As a result, the `multidex` option everywhere is obsolete. This PR removes all logic and tests related to that option that I could find. `Google testing` and `customer_tests` pass on this PR, so it seems like this won't be too breaking if it is at all. If needed I'll give this some time to bake in the framework before landing the flutter/engine PRs. Context: https://github.com/flutter/flutter/issues/138117, https://github.com/flutter/flutter/issues/141277, b/319373605
This commit is contained in:
parent
bdb71b8f5a
commit
6a6874ecf9
@ -19,8 +19,8 @@ FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"
|
||||
DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
|
||||
DART_SDK_PATH_OLD="$DART_SDK_PATH.old"
|
||||
ENGINE_STAMP="$FLUTTER_ROOT/bin/cache/engine-dart-sdk.stamp"
|
||||
ENGINE_VERSION=`cat "$FLUTTER_ROOT/bin/internal/engine.version"`
|
||||
ENGINE_REALM=`cat "$FLUTTER_ROOT/bin/internal/engine.realm"`
|
||||
ENGINE_VERSION=$(cat "$FLUTTER_ROOT/bin/internal/engine.version")
|
||||
ENGINE_REALM=$(cat "$FLUTTER_ROOT/bin/internal/engine.realm" | tr -d '[:space:]')
|
||||
OS="$(uname -s)"
|
||||
|
||||
if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; then
|
||||
|
@ -14,7 +14,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.add2app"
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
@ -14,7 +14,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.add2app"
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
@ -34,7 +34,7 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
@ -26,8 +26,6 @@ androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath
|
||||
androidx.lifecycle:lifecycle-runtime:2.3.1=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.multidex:multidex-instrumentation:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
|
||||
androidx.multidex:multidex:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test.espresso:espresso-core:3.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test.espresso:espresso-idling-resource:3.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
@ -39,27 +37,19 @@ androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileCl
|
||||
androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-common:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-common:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-core:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-core:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-dash:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-dash:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-database:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-datasource:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-decoder:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-extractor:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-extractor:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-hls:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-hls:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-smoothstreaming:2.14.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-common:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-core:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-dash:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-database:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-datasource:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-decoder:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-extractor:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-hls:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.code.findbugs:jsr305:3.0.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.3.2=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.7.1=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.7.1=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:failureaccess:1.0.1=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:guava:28.1-android=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:guava:31.0.1-android=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
com.google.guava:guava:31.0.1-android=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.j2objc:j2objc-annotations:1.3=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.squareup:javawriter:2.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
@ -68,8 +58,7 @@ junit:junit:4.12=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspa
|
||||
junit:junit:4.13=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
net.sf.kxml:kxml2:2.3.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.checkerframework:checker-compat-qual:2.5.5=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.checkerframework:checker-qual:3.12.0=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
org.codehaus.mojo:animal-sniffer-annotations:1.18=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.checkerframework:checker-qual:3.12.0=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.hamcrest:hamcrest-core:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.hamcrest:hamcrest-integration:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.hamcrest:hamcrest-library:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
|
@ -1,47 +1,96 @@
|
||||
# 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.activity:activity:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.annotation:annotation-experimental:1.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.annotation:annotation:1.3.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.arch.core:core-common:2.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.arch.core:core-runtime:2.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.collection:collection:1.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.concurrent:concurrent-futures:1.0.0=debugRuntimeClasspath,profileRuntimeClasspath,releaseRuntimeClasspath
|
||||
androidx.core:core:1.7.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.customview:customview:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.fragment:fragment:1.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-common-java8:2.2.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-common:2.3.1=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-livedata:2.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-runtime:2.3.1=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.loader:loader:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.savedstate:savedstate:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.tracing:tracing:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.1=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.viewpager:viewpager:1.0.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.window:window-java:1.0.0-beta04=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
androidx.window:window:1.0.0-beta04=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-common:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-core:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-dash:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-database:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-datasource:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-decoder:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-extractor:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-hls:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.guava:failureaccess:1.0.1=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.guava:guava:31.0.1-android=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
org.jetbrains:annotations:13.0=debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
empty=androidApis,debugAnnotationProcessorClasspath,lintPublish,profileAnnotationProcessorClasspath,releaseAnnotationProcessorClasspath
|
||||
androidx.activity:activity:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.annotation:annotation:1.3.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.arch.core:core-runtime:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.concurrent:concurrent-futures:1.0.0=debugAndroidTestRuntimeClasspath,debugRuntimeClasspath,debugUnitTestRuntimeClasspath,profileRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.core:core:1.7.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-common:2.3.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-runtime:2.3.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test.espresso:espresso-idling-resource:3.5.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test:annotation:1.0.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test:core:1.3.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.test:monitor:1.6.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.almworks.sqlite4java:sqlite4java:1.0.392=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-common:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-core:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-dash:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-database:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-datasource:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-decoder:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-extractor:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-hls:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.auto.value:auto-value-annotations:1.10.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.code.findbugs:jsr305:3.0.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.errorprone:error_prone_annotations:2.18.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:failureaccess:1.0.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:guava:31.0.1-android=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath
|
||||
com.google.guava:guava:31.1-jre=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.google.j2objc:j2objc-annotations:1.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
com.ibm.icu:icu4j:72.1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
javax.annotation:javax.annotation-api:1.3.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
javax.inject:javax.inject:1=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
junit:junit:4.13.2=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy-agent:1.12.22=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.12.22=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.bouncycastle:bcprov-jdk18on:1.72=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.checkerframework:checker-qual:3.12.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.hamcrest:hamcrest-core:1.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt
|
||||
org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt
|
||||
org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt
|
||||
org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.mockito:mockito-core:5.0.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.mockito:mockito-inline:5.0.0=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.objenesis:objenesis:3.3=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.ow2.asm:asm-analysis:9.1=androidJacocoAnt
|
||||
org.ow2.asm:asm-analysis:9.5=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.ow2.asm:asm-commons:9.1=androidJacocoAnt
|
||||
org.ow2.asm:asm-commons:9.5=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.ow2.asm:asm-tree:9.1=androidJacocoAnt
|
||||
org.ow2.asm:asm-tree:9.5=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.ow2.asm:asm-util:9.5=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.ow2.asm:asm:9.1=androidJacocoAnt
|
||||
org.ow2.asm:asm:9.5=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:annotations:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:junit:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:nativeruntime-dist-compat:1.0.1=debugUnitTestRuntimeClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:nativeruntime:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:pluginapi:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:plugins-maven-dependency-resolver:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:resources:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:robolectric:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:sandbox:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:shadowapi:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:shadows-framework:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:utils-reflector:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
org.robolectric:utils:4.10.3=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
|
||||
empty=androidApis,androidJdkImage,androidTestUtil,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAnnotationProcessorClasspath,debugUnitTestAnnotationProcessorClasspath,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileUnitTestAnnotationProcessorClasspath,releaseAnnotationProcessorClasspath,releaseUnitTestAnnotationProcessorClasspath
|
||||
|
@ -14,7 +14,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.flutter.addtoapp"
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
@ -52,7 +52,6 @@ android {
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@ -68,8 +67,6 @@ flutter {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def multidex_version = "2.0.1"
|
||||
implementation "androidx.multidex:multidex:$multidex_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
|
@ -5,7 +5,6 @@ found in the LICENSE file. -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
android:name="androidx.multidex.MultiDexApplication"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
@ -1,5 +0,0 @@
|
||||
io/flutter/app/FlutterApplication.class
|
||||
io/flutter/app/FlutterMultiDexApplication.class
|
||||
io/flutter/embedding/engine/loader/FlutterLoader.class
|
||||
io/flutter/view/FlutterMain.class
|
||||
io/flutter/util/PathUtils.class
|
@ -45,7 +45,7 @@ class FlutterExtension {
|
||||
public final int compileSdkVersion = 34
|
||||
|
||||
/** Sets the minSdkVersion used by default in Flutter app projects. */
|
||||
public final int minSdkVersion = 19
|
||||
public final int minSdkVersion = 21
|
||||
|
||||
/**
|
||||
* Sets the targetSdkVersion used by default in Flutter app projects.
|
||||
@ -323,22 +323,6 @@ class FlutterPlugin implements Plugin<Project> {
|
||||
String flutterExecutableName = Os.isFamily(Os.FAMILY_WINDOWS) ? "flutter.bat" : "flutter"
|
||||
flutterExecutable = Paths.get(flutterRoot.absolutePath, "bin", flutterExecutableName).toFile()
|
||||
|
||||
final String propMultidexEnabled = "multidex-enabled"
|
||||
if (project.hasProperty(propMultidexEnabled) &&
|
||||
project.property(propMultidexEnabled).toBoolean()) {
|
||||
String flutterMultidexKeepfile = Paths.get(flutterRoot.absolutePath, "packages", "flutter_tools",
|
||||
"gradle", "flutter_multidex_keepfile.txt")
|
||||
project.android {
|
||||
buildTypes {
|
||||
release {
|
||||
multiDexKeepFile(project.file(flutterMultidexKeepfile))
|
||||
}
|
||||
}
|
||||
}
|
||||
project.dependencies {
|
||||
implementation("androidx.multidex:multidex:2.0.1")
|
||||
}
|
||||
}
|
||||
// Use Kotlin DSL to handle baseApplicationName logic due to Groovy dynamic dispatch bug.
|
||||
project.apply from: Paths.get(flutterRoot.absolutePath, "packages", "flutter_tools", "gradle", "src", "main", "kotlin", "flutter.gradle.kts")
|
||||
|
||||
|
@ -10,13 +10,6 @@ class FlutterPluginKts : Plugin<Project> {
|
||||
project.withGroovyBuilder {
|
||||
getProperty("android").withGroovyBuilder {
|
||||
getProperty("defaultConfig").withGroovyBuilder {
|
||||
if (project.hasProperty("multidex-enabled") &&
|
||||
project.property("multidex-enabled").toString().toBoolean()) {
|
||||
setProperty("multiDexEnabled", true)
|
||||
getProperty("manifestPlaceholders").withGroovyBuilder {
|
||||
setProperty("applicationName", "io.flutter.app.FlutterMultiDexApplication")
|
||||
}
|
||||
} else {
|
||||
var baseApplicationName: String = "android.app.Application"
|
||||
if (project.hasProperty("base-application-name")) {
|
||||
baseApplicationName = project.property("base-application-name").toString()
|
||||
@ -29,5 +22,4 @@ class FlutterPluginKts : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -587,7 +587,6 @@ class AndroidDevice extends Device {
|
||||
debuggingOptions.buildInfo,
|
||||
targetArchs: <AndroidArch>[androidArch],
|
||||
fastStart: debuggingOptions.fastStart,
|
||||
multidexEnabled: (platformArgs['multidex'] as bool?) ?? false,
|
||||
),
|
||||
);
|
||||
// Package has been built, so we can get the updated application ID and
|
||||
|
@ -38,7 +38,6 @@ import 'java.dart';
|
||||
import 'migrations/android_studio_java_gradle_conflict_migration.dart';
|
||||
import 'migrations/min_sdk_version_migration.dart';
|
||||
import 'migrations/top_level_gradle_build_file_migration.dart';
|
||||
import 'multidex.dart';
|
||||
|
||||
/// The regex to grab variant names from printBuildVariants gradle task
|
||||
///
|
||||
@ -395,16 +394,6 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
command.add('-Ptarget-platform=$targetPlatforms');
|
||||
}
|
||||
command.add('-Ptarget=$target');
|
||||
// Only attempt adding multidex support if all the flutter generated files exist.
|
||||
// If the files do not exist and it was unintentional, the app will fail to build
|
||||
// and prompt the developer if they wish Flutter to add the files again via gradle_error.dart.
|
||||
if (androidBuildInfo.multidexEnabled &&
|
||||
multiDexApplicationExists(project.directory) &&
|
||||
androidManifestHasNameVariable(project.directory)) {
|
||||
command.add('-Pmultidex-enabled=true');
|
||||
ensureMultiDexApplicationExists(project.directory);
|
||||
_logger.printStatus('Building with Flutter multidex support enabled.');
|
||||
}
|
||||
// If using v1 embedding, we want to use FlutterApplication as the base app.
|
||||
final String baseApplicationName =
|
||||
project.android.getEmbeddingVersion() == AndroidEmbeddingVersion.v2 ?
|
||||
@ -512,7 +501,6 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
line: detectedGradleErrorLine!,
|
||||
project: project,
|
||||
usesAndroidX: usesAndroidX,
|
||||
multidexEnabled: androidBuildInfo.multidexEnabled,
|
||||
);
|
||||
|
||||
if (maxRetries == null || retry < maxRetries) {
|
||||
|
@ -12,7 +12,6 @@ import '../globals.dart' as globals;
|
||||
import '../project.dart';
|
||||
import '../reporting/reporting.dart';
|
||||
import 'gradle_utils.dart';
|
||||
import 'multidex.dart';
|
||||
|
||||
typedef GradleErrorTest = bool Function(String);
|
||||
|
||||
@ -33,7 +32,6 @@ class GradleHandledError {
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) handler;
|
||||
|
||||
/// The [BuildEvent] label is named gradle-[eventLabel].
|
||||
@ -74,7 +72,6 @@ final List<GradleHandledError> gradleErrors = <GradleHandledError>[
|
||||
minSdkVersionHandler,
|
||||
transformInputIssueHandler,
|
||||
lockFileDepMissingHandler,
|
||||
multidexErrorHandler,
|
||||
incompatibleKotlinVersionHandler,
|
||||
minCompileSdkVersionHandler,
|
||||
jvm11RequiredHandler,
|
||||
@ -88,102 +85,6 @@ final List<GradleHandledError> gradleErrors = <GradleHandledError>[
|
||||
|
||||
const String _boxTitle = 'Flutter Fix';
|
||||
|
||||
// Multidex error message.
|
||||
@visibleForTesting
|
||||
final GradleHandledError multidexErrorHandler = GradleHandledError(
|
||||
test: _lineMatcher(const <String>[
|
||||
'com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:',
|
||||
'The number of method references in a .dex file cannot exceed 64K.',
|
||||
]),
|
||||
handler: ({
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printStatus('${globals.logger.terminal.warningMark} App requires Multidex support', emphasis: true);
|
||||
if (multidexEnabled) {
|
||||
globals.printStatus(
|
||||
'Multidex support is required for your android app to build since the number of methods has exceeded 64k. '
|
||||
'See https://docs.flutter.dev/deployment/android#enabling-multidex-support for more information. '
|
||||
"You may pass the --no-multidex flag to skip Flutter's multidex support to use a manual solution.\n",
|
||||
indent: 4,
|
||||
);
|
||||
if (!androidManifestHasNameVariable(project.directory)) {
|
||||
globals.printStatus(
|
||||
r'Your `android/app/src/main/AndroidManifest.xml` does not contain `android:name="${applicationName}"` '
|
||||
'under the `application` element. This may be due to creating your project with an old version of Flutter. '
|
||||
'Add the `android:name="\${applicationName}"` attribute to your AndroidManifest.xml to enable Flutter\'s multidex support:\n',
|
||||
indent: 4,
|
||||
);
|
||||
globals.printStatus(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
...
|
||||
<application
|
||||
...
|
||||
android:name=''',
|
||||
indent: 8,
|
||||
newline: false,
|
||||
color: TerminalColor.grey,
|
||||
);
|
||||
globals.printStatus(r'"${applicationName}"', color: TerminalColor.green, newline: true);
|
||||
globals.printStatus(r'''
|
||||
...>
|
||||
''',
|
||||
indent: 8,
|
||||
color: TerminalColor.grey,
|
||||
);
|
||||
|
||||
globals.printStatus(
|
||||
'You may also roll your own multidex support by following the guide at: https://developer.android.com/studio/build/multidex\n',
|
||||
indent: 4,
|
||||
);
|
||||
return GradleBuildStatus.exit;
|
||||
}
|
||||
if (!multiDexApplicationExists(project.directory)) {
|
||||
globals.printStatus(
|
||||
'Flutter tool can add multidex support. The following file will be added by flutter:\n',
|
||||
indent: 4,
|
||||
);
|
||||
globals.printStatus(
|
||||
'android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java\n',
|
||||
indent: 8,
|
||||
);
|
||||
String selection = 'n';
|
||||
// Default to 'no' if no interactive terminal.
|
||||
try {
|
||||
selection = await globals.terminal.promptForCharInput(
|
||||
<String>['y', 'n'],
|
||||
logger: globals.logger,
|
||||
prompt: 'Do you want to continue with adding multidex support for Android?',
|
||||
defaultChoiceIndex: 0,
|
||||
);
|
||||
} on StateError catch (e) {
|
||||
globals.printError(
|
||||
e.message,
|
||||
indent: 0,
|
||||
);
|
||||
}
|
||||
if (selection == 'y') {
|
||||
ensureMultiDexApplicationExists(project.directory);
|
||||
globals.printStatus(
|
||||
'Multidex enabled. Retrying build.\n',
|
||||
indent: 0,
|
||||
);
|
||||
return GradleBuildStatus.retry;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
globals.printBox(
|
||||
'Flutter multidex handling is disabled. If you wish to let the tool configure multidex, use the --multidex flag.',
|
||||
title: _boxTitle,
|
||||
);
|
||||
}
|
||||
return GradleBuildStatus.exit;
|
||||
},
|
||||
eventLabel: 'multidex-error',
|
||||
);
|
||||
|
||||
// Permission defined error message.
|
||||
@visibleForTesting
|
||||
final GradleHandledError permissionDeniedErrorHandler = GradleHandledError(
|
||||
@ -194,7 +95,6 @@ final GradleHandledError permissionDeniedErrorHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printBox(
|
||||
'${globals.logger.terminal.warningMark} Gradle does not have execution permission.\n'
|
||||
@ -226,7 +126,6 @@ final GradleHandledError networkErrorHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printError(
|
||||
'${globals.logger.terminal.warningMark} '
|
||||
@ -257,7 +156,6 @@ final GradleHandledError zipExceptionHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printError(
|
||||
'${globals.logger.terminal.warningMark} '
|
||||
@ -309,7 +207,6 @@ final GradleHandledError r8FailureHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printBox(
|
||||
'${globals.logger.terminal.warningMark} The shrinker may have failed to optimize the Java bytecode.\n'
|
||||
@ -334,7 +231,6 @@ final GradleHandledError licenseNotAcceptedHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
const String licenseNotAcceptedMatcher =
|
||||
r'You have not accepted the license agreements of the following SDK components:\s*\[(.+)\]';
|
||||
@ -368,7 +264,6 @@ final GradleHandledError flavorUndefinedHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final RunResult tasksRunResult = await globals.processUtils.run(
|
||||
<String>[
|
||||
@ -440,7 +335,6 @@ final GradleHandledError minSdkVersionHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradleFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -482,7 +376,6 @@ final GradleHandledError transformInputIssueHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradleFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -516,7 +409,6 @@ final GradleHandledError lockFileDepMissingHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradleFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -544,7 +436,6 @@ final GradleHandledError incompatibleKotlinVersionHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradleFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -569,7 +460,6 @@ final GradleHandledError outdatedGradleHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradleFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -604,7 +494,6 @@ final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final Match? minCompileSdkVersionMatch = _minCompileSdkVersionPattern.firstMatch(line);
|
||||
assert(minCompileSdkVersionMatch?.groupCount == 1);
|
||||
@ -635,7 +524,6 @@ final GradleHandledError jvm11RequiredHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printBox(
|
||||
'${globals.logger.terminal.warningMark} You need Java 11 or higher to build your app with this version of Gradle.\n\n'
|
||||
@ -659,7 +547,6 @@ final GradleHandledError sslExceptionHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printError(
|
||||
'${globals.logger.terminal.warningMark} '
|
||||
@ -684,7 +571,6 @@ final GradleHandledError incompatibleJavaAndGradleVersionsHandler = GradleHandle
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
final File gradlePropertiesFile = project.directory
|
||||
.childDirectory('android')
|
||||
@ -718,7 +604,6 @@ final GradleHandledError remoteTerminatedHandshakeHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printError(
|
||||
'${globals.logger.terminal.warningMark} '
|
||||
@ -737,7 +622,6 @@ final GradleHandledError couldNotOpenCacheDirectoryHandler = GradleHandledError(
|
||||
required String line,
|
||||
required FlutterProject project,
|
||||
required bool usesAndroidX,
|
||||
required bool multidexEnabled,
|
||||
}) async {
|
||||
globals.printError(
|
||||
'${globals.logger.terminal.warningMark} '
|
||||
|
@ -40,7 +40,7 @@ const String templateKotlinGradlePluginVersion = '1.7.10';
|
||||
//
|
||||
// Please see the README before changing any of these values.
|
||||
const String compileSdkVersion = '34';
|
||||
const String minSdkVersion = '19';
|
||||
const String minSdkVersion = '21';
|
||||
const String targetSdkVersion = '33';
|
||||
const String ndkVersion = '23.1.7779620';
|
||||
|
||||
@ -107,9 +107,11 @@ final RegExp gradleOrgVersionMatch =
|
||||
);
|
||||
|
||||
// This matches uncommented minSdkVersion lines in the module-level build.gradle
|
||||
// file which have minSdkVersion 16,17, or 18 (the Jelly Bean api levels).
|
||||
final RegExp jellyBeanMinSdkVersionMatch =
|
||||
RegExp(r'(?<=^\s*)minSdkVersion 1[678](?=\s*(?://|$))', multiLine: true);
|
||||
// file which have minSdkVersion 16,17, 18, 19, or 20.
|
||||
final RegExp tooOldMinSdkVersionMatch = RegExp(
|
||||
r'(?<=^\s*)minSdkVersion (1[6789]|20)(?=\s*(?://|$))',
|
||||
multiLine: true,
|
||||
);
|
||||
|
||||
// From https://docs.gradle.org/current/userguide/command_line_interface.html#command_line_interface
|
||||
const String gradleVersionFlag = r'--version';
|
||||
|
@ -42,6 +42,8 @@ class MinSdkVersionMigration extends ProjectMigrator {
|
||||
|
||||
@override
|
||||
String migrateFileContents(String fileContents) {
|
||||
return fileContents.replaceAll(jellyBeanMinSdkVersionMatch, replacementMinSdkText);
|
||||
return fileContents.replaceAll(
|
||||
tooOldMinSdkVersionMatch, replacementMinSdkText,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,109 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:xml/xml.dart';
|
||||
|
||||
import '../base/file_system.dart';
|
||||
|
||||
// These utility methods are used to generate the code for multidex support as
|
||||
// well as verifying the project is properly set up.
|
||||
|
||||
File _getMultiDexApplicationFile(Directory projectDir) {
|
||||
return projectDir.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childDirectory('java')
|
||||
.childDirectory('io')
|
||||
.childDirectory('flutter')
|
||||
.childDirectory('app')
|
||||
.childFile('FlutterMultiDexApplication.java');
|
||||
}
|
||||
|
||||
/// Creates the FlutterMultiDexApplication.java if it does not exist.
|
||||
void ensureMultiDexApplicationExists(final Directory projectDir) {
|
||||
final File applicationFile = _getMultiDexApplicationFile(projectDir);
|
||||
if (applicationFile.existsSync()) {
|
||||
// This checks for instances of legacy versions of this file. Legacy versions maintained
|
||||
// compatibility with v1 embedding by extending FlutterApplication. If we detect this,
|
||||
// we replace the file with the modern v2 embedding version.
|
||||
if (applicationFile.readAsStringSync().contains('android.app.Application;')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
applicationFile.createSync(recursive: true);
|
||||
|
||||
final StringBuffer buffer = StringBuffer();
|
||||
buffer.write('''
|
||||
// Generated file.
|
||||
//
|
||||
// If you wish to remove Flutter's multidex support, delete this entire file.
|
||||
//
|
||||
// Modifications to this file should be done in a copy under a different name
|
||||
// as this file may be regenerated.
|
||||
|
||||
package io.flutter.app;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
/**
|
||||
* Extension of {@link android.app.Application}, adding multidex support.
|
||||
*/
|
||||
public class FlutterMultiDexApplication extends Application {
|
||||
@Override
|
||||
@CallSuper
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
MultiDex.install(this);
|
||||
}
|
||||
}
|
||||
''');
|
||||
applicationFile.writeAsStringSync(buffer.toString(), flush: true);
|
||||
}
|
||||
|
||||
/// Returns true if FlutterMultiDexApplication.java exists.
|
||||
///
|
||||
/// This function does not verify the contents of the file.
|
||||
bool multiDexApplicationExists(final Directory projectDir) {
|
||||
if (_getMultiDexApplicationFile(projectDir).existsSync()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
File _getManifestFile(Directory projectDir) {
|
||||
return projectDir.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
}
|
||||
|
||||
/// Returns true if the `app` module AndroidManifest.xml includes the
|
||||
/// <application android:name="${applicationName}"> attribute.
|
||||
bool androidManifestHasNameVariable(final Directory projectDir) {
|
||||
final File manifestFile = _getManifestFile(projectDir);
|
||||
if (!manifestFile.existsSync()) {
|
||||
return false;
|
||||
}
|
||||
XmlDocument document;
|
||||
try {
|
||||
document = XmlDocument.parse(manifestFile.readAsStringSync());
|
||||
} on XmlException {
|
||||
return false;
|
||||
} on FileSystemException {
|
||||
return false;
|
||||
}
|
||||
// Check for the ${androidName} application attribute.
|
||||
for (final XmlElement application in document.findAllElements('application')) {
|
||||
final String? applicationName = application.getAttribute('android:name');
|
||||
if (applicationName == r'${applicationName}') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
@ -332,7 +332,6 @@ class AndroidBuildInfo {
|
||||
],
|
||||
this.splitPerAbi = false,
|
||||
this.fastStart = false,
|
||||
this.multidexEnabled = false,
|
||||
});
|
||||
|
||||
// The build info containing the mode and flavor.
|
||||
@ -350,9 +349,6 @@ class AndroidBuildInfo {
|
||||
|
||||
/// Whether to bootstrap an empty application.
|
||||
final bool fastStart;
|
||||
|
||||
/// Whether to enable multidex support for apps with more than 64k methods.
|
||||
final bool multidexEnabled;
|
||||
}
|
||||
|
||||
/// A summary of the compilation strategy used for Dart.
|
||||
|
@ -37,7 +37,6 @@ class BuildApkCommand extends BuildSubCommand {
|
||||
addNullSafetyModeOptions(hide: !verboseHelp);
|
||||
usesAnalyzeSizeFlag();
|
||||
addAndroidSpecificBuildOptions(hide: !verboseHelp);
|
||||
addMultidexOption();
|
||||
addIgnoreDeprecationOption();
|
||||
argParser
|
||||
..addFlag('split-per-abi',
|
||||
@ -134,7 +133,6 @@ class BuildApkCommand extends BuildSubCommand {
|
||||
buildInfo,
|
||||
splitPerAbi: boolArg('split-per-abi'),
|
||||
targetArchs: stringsArg('target-platform').map<AndroidArch>(getAndroidArchForName),
|
||||
multidexEnabled: boolArg('multidex'),
|
||||
);
|
||||
validateBuild(androidBuildInfo);
|
||||
displayNullSafetyMode(androidBuildInfo.buildInfo);
|
||||
|
@ -42,7 +42,6 @@ class BuildAppBundleCommand extends BuildSubCommand {
|
||||
addEnableExperimentation(hide: !verboseHelp);
|
||||
usesAnalyzeSizeFlag();
|
||||
addAndroidSpecificBuildOptions(hide: !verboseHelp);
|
||||
addMultidexOption();
|
||||
addIgnoreDeprecationOption();
|
||||
argParser.addMultiOption('target-platform',
|
||||
defaultsTo: <String>['android-arm', 'android-arm64', 'android-x64'],
|
||||
@ -138,7 +137,6 @@ class BuildAppBundleCommand extends BuildSubCommand {
|
||||
|
||||
final AndroidBuildInfo androidBuildInfo = AndroidBuildInfo(await getBuildInfo(),
|
||||
targetArchs: stringsArg('target-platform').map<AndroidArch>(getAndroidArchForName),
|
||||
multidexEnabled: boolArg('multidex'),
|
||||
);
|
||||
// Do all setup verification that doesn't involve loading units. Checks that
|
||||
// require generated loading units are done after gen_snapshot in assemble.
|
||||
|
@ -650,7 +650,6 @@ class AppDomain extends Domain {
|
||||
String? packagesFilePath,
|
||||
String? dillOutputPath,
|
||||
bool ipv6 = false,
|
||||
bool multidexEnabled = false,
|
||||
String? isolateFilter,
|
||||
bool machine = true,
|
||||
String? userIdentifier,
|
||||
@ -703,7 +702,6 @@ class AppDomain extends Domain {
|
||||
projectRootPath: projectRootPath,
|
||||
dillOutputPath: dillOutputPath,
|
||||
ipv6: ipv6,
|
||||
multidexEnabled: multidexEnabled,
|
||||
hostIsIde: true,
|
||||
machine: machine,
|
||||
analytics: globals.analytics,
|
||||
@ -715,7 +713,6 @@ class AppDomain extends Domain {
|
||||
debuggingOptions: options,
|
||||
applicationBinary: applicationBinary,
|
||||
ipv6: ipv6,
|
||||
multidexEnabled: multidexEnabled,
|
||||
machine: machine,
|
||||
);
|
||||
}
|
||||
|
@ -71,7 +71,6 @@ class DriveCommand extends RunCommandBase {
|
||||
// to prevent a local network permission dialog on iOS 14+,
|
||||
// which cannot be accepted or dismissed in a CI environment.
|
||||
addPublishPort(enabledByDefault: false, verboseHelp: verboseHelp);
|
||||
addMultidexOption();
|
||||
argParser
|
||||
..addFlag('keep-app-running',
|
||||
help: 'Will keep the Flutter application running when done testing.\n'
|
||||
@ -281,8 +280,6 @@ class DriveCommand extends RunCommandBase {
|
||||
'trace-startup': traceStartup,
|
||||
if (web)
|
||||
'--no-launch-chrome': true,
|
||||
if (boolArg('multidex'))
|
||||
'multidex': true,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
@ -337,7 +337,6 @@ class RunCommand extends RunCommandBase {
|
||||
// This will allow subsequent "flutter attach" commands to connect to the VM
|
||||
// without needing to know the port.
|
||||
addPublishPort(verboseHelp: verboseHelp);
|
||||
addMultidexOption();
|
||||
addIgnoreDeprecationOption();
|
||||
argParser
|
||||
..addFlag('await-first-frame-when-tracing',
|
||||
@ -640,7 +639,6 @@ class RunCommand extends RunCommandBase {
|
||||
dillOutputPath: stringArg('output-dill'),
|
||||
stayResident: stayResident,
|
||||
ipv6: ipv6 ?? false,
|
||||
multidexEnabled: boolArg('multidex'),
|
||||
analytics: globals.analytics,
|
||||
nativeAssetsYamlFile: stringArg(FlutterOptions.kNativeAssetsYamlFile),
|
||||
);
|
||||
@ -670,7 +668,6 @@ class RunCommand extends RunCommandBase {
|
||||
: globals.fs.file(applicationBinaryPath),
|
||||
ipv6: ipv6 ?? false,
|
||||
stayResident: stayResident,
|
||||
multidexEnabled: boolArg('multidex'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -715,7 +712,6 @@ class RunCommand extends RunCommandBase {
|
||||
packagesFilePath: globalResults![FlutterGlobalOptions.kPackagesOption] as String?,
|
||||
dillOutputPath: stringArg('output-dill'),
|
||||
ipv6: ipv6 ?? false,
|
||||
multidexEnabled: boolArg('multidex'),
|
||||
userIdentifier: userIdentifier,
|
||||
enableDevTools: boolArg(FlutterCommand.kEnableDevTools),
|
||||
);
|
||||
|
@ -455,9 +455,7 @@ class FlutterDevice {
|
||||
}
|
||||
devFSWriter = device!.createDevFSWriter(applicationPackage, userIdentifier);
|
||||
|
||||
final Map<String, dynamic> platformArgs = <String, dynamic>{
|
||||
'multidex': hotRunner.multidexEnabled,
|
||||
};
|
||||
final Map<String, dynamic> platformArgs = <String, dynamic>{};
|
||||
|
||||
await startEchoingDeviceLog(hotRunner.debuggingOptions);
|
||||
|
||||
@ -525,7 +523,6 @@ class FlutterDevice {
|
||||
|
||||
final Map<String, dynamic> platformArgs = <String, dynamic>{};
|
||||
platformArgs['trace-startup'] = coldRunner.traceStartup;
|
||||
platformArgs['multidex'] = coldRunner.multidexEnabled;
|
||||
|
||||
await startEchoingDeviceLog(coldRunner.debuggingOptions);
|
||||
|
||||
|
@ -21,7 +21,6 @@ class ColdRunner extends ResidentRunner {
|
||||
this.traceStartup = false,
|
||||
this.awaitFirstFrameWhenTracing = true,
|
||||
this.applicationBinary,
|
||||
this.multidexEnabled = false,
|
||||
bool super.ipv6 = false,
|
||||
super.stayResident,
|
||||
super.machine,
|
||||
@ -33,7 +32,6 @@ class ColdRunner extends ResidentRunner {
|
||||
final bool traceStartup;
|
||||
final bool awaitFirstFrameWhenTracing;
|
||||
final File? applicationBinary;
|
||||
final bool multidexEnabled;
|
||||
bool _didAttach = false;
|
||||
|
||||
@override
|
||||
|
@ -89,7 +89,6 @@ class HotRunner extends ResidentRunner {
|
||||
super.stayResident,
|
||||
bool super.ipv6 = false,
|
||||
super.machine,
|
||||
this.multidexEnabled = false,
|
||||
super.devtoolsHandler,
|
||||
StopwatchFactory stopwatchFactory = const StopwatchFactory(),
|
||||
ReloadSourcesHelper reloadSourcesHelper = defaultReloadSourcesHelper,
|
||||
@ -115,7 +114,6 @@ class HotRunner extends ResidentRunner {
|
||||
final bool benchmarkMode;
|
||||
final File? applicationBinary;
|
||||
final bool hostIsIde;
|
||||
final bool multidexEnabled;
|
||||
|
||||
/// When performing a hot restart, the tool needs to upload a new main.dart.dill to
|
||||
/// each attached device's devfs. Replacing the existing file is not safe and does
|
||||
|
@ -1015,15 +1015,6 @@ abstract class FlutterCommand extends Command<void> {
|
||||
);
|
||||
}
|
||||
|
||||
void addMultidexOption({ bool hide = false }) {
|
||||
argParser.addFlag('multidex',
|
||||
defaultsTo: true,
|
||||
help: 'When enabled, indicates that the app should be built with multidex support. This '
|
||||
'flag adds the dependencies for multidex when the minimum android sdk is 20 or '
|
||||
'below. For android sdk versions 21 and above, multidex support is native.',
|
||||
);
|
||||
}
|
||||
|
||||
void addIgnoreDeprecationOption({ bool hide = false }) {
|
||||
argParser.addFlag('ignore-deprecation',
|
||||
negatable: false,
|
||||
|
@ -595,61 +595,6 @@ void main() {
|
||||
});
|
||||
|
||||
group('--machine', () {
|
||||
testUsingContext('enables multidex by default', () async {
|
||||
final DaemonCapturingRunCommand command = DaemonCapturingRunCommand();
|
||||
final FakeDevice device = FakeDevice();
|
||||
testDeviceManager.devices = <Device>[device];
|
||||
|
||||
await expectLater(
|
||||
() => createTestCommandRunner(command).run(<String>[
|
||||
'run',
|
||||
'--no-pub',
|
||||
'--machine',
|
||||
'-d',
|
||||
device.id,
|
||||
]),
|
||||
throwsToolExit(),
|
||||
);
|
||||
expect(command.appDomain.multidexEnabled, isTrue);
|
||||
}, overrides: <Type, Generator>{
|
||||
Artifacts: () => artifacts,
|
||||
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
|
||||
DeviceManager: () => testDeviceManager,
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
Usage: () => usage,
|
||||
Stdio: () => FakeStdio(),
|
||||
Logger: () => AppRunLogger(parent: BufferLogger.test()),
|
||||
});
|
||||
|
||||
testUsingContext('can disable multidex with --no-multidex', () async {
|
||||
final DaemonCapturingRunCommand command = DaemonCapturingRunCommand();
|
||||
final FakeDevice device = FakeDevice();
|
||||
testDeviceManager.devices = <Device>[device];
|
||||
|
||||
await expectLater(
|
||||
() => createTestCommandRunner(command).run(<String>[
|
||||
'run',
|
||||
'--no-pub',
|
||||
'--no-multidex',
|
||||
'--machine',
|
||||
'-d',
|
||||
device.id,
|
||||
]),
|
||||
throwsToolExit(),
|
||||
);
|
||||
expect(command.appDomain.multidexEnabled, isFalse);
|
||||
}, overrides: <Type, Generator>{
|
||||
Artifacts: () => artifacts,
|
||||
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
|
||||
DeviceManager: () => testDeviceManager,
|
||||
FileSystem: () => fs,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
Usage: () => usage,
|
||||
Stdio: () => FakeStdio(),
|
||||
Logger: () => AppRunLogger(parent: BufferLogger.test()),
|
||||
});
|
||||
|
||||
testUsingContext('can pass --device-user', () async {
|
||||
final DaemonCapturingRunCommand command = DaemonCapturingRunCommand();
|
||||
final FakeDevice device = FakeDevice(platformType: PlatformType.android);
|
||||
@ -1570,7 +1515,6 @@ class DaemonCapturingRunCommand extends RunCommand {
|
||||
class CapturingAppDomain extends AppDomain {
|
||||
CapturingAppDomain(super.daemon);
|
||||
|
||||
bool? multidexEnabled;
|
||||
String? userIdentifier;
|
||||
bool? enableDevTools;
|
||||
|
||||
@ -1588,14 +1532,12 @@ class CapturingAppDomain extends AppDomain {
|
||||
String? packagesFilePath,
|
||||
String? dillOutputPath,
|
||||
bool ipv6 = false,
|
||||
bool multidexEnabled = false,
|
||||
String? isolateFilter,
|
||||
bool machine = true,
|
||||
String? userIdentifier,
|
||||
bool enableDevTools = true,
|
||||
String? flavor,
|
||||
}) async {
|
||||
this.multidexEnabled = multidexEnabled;
|
||||
this.userIdentifier = userIdentifier;
|
||||
this.enableDevTools = enableDevTools;
|
||||
throwToolExit('');
|
||||
|
@ -117,7 +117,6 @@ void main() {
|
||||
String? line,
|
||||
FlutterProject? project,
|
||||
bool? usesAndroidX,
|
||||
bool? multidexEnabled
|
||||
}) async {
|
||||
handlerCalled = true;
|
||||
return GradleBuildStatus.exit;
|
||||
@ -312,7 +311,6 @@ void main() {
|
||||
String? line,
|
||||
FlutterProject? project,
|
||||
bool? usesAndroidX,
|
||||
bool? multidexEnabled
|
||||
}) async {
|
||||
return GradleBuildStatus.retry;
|
||||
},
|
||||
@ -415,7 +413,6 @@ void main() {
|
||||
String? line,
|
||||
FlutterProject? project,
|
||||
bool? usesAndroidX,
|
||||
bool? multidexEnabled
|
||||
}) async {
|
||||
handlerCalled = true;
|
||||
return GradleBuildStatus.exit;
|
||||
@ -603,7 +600,6 @@ void main() {
|
||||
String? line,
|
||||
FlutterProject? project,
|
||||
bool? usesAndroidX,
|
||||
bool? multidexEnabled
|
||||
}) async {
|
||||
return GradleBuildStatus.retry;
|
||||
},
|
||||
|
@ -332,7 +332,7 @@ tasks.register("clean", Delete) {
|
||||
});
|
||||
});
|
||||
|
||||
group('migrate min sdk versions less than 19 to flutter.minSdkVersion '
|
||||
group('migrate min sdk versions less than 21 to flutter.minSdkVersion '
|
||||
'when in a FlutterProject that is an app', ()
|
||||
{
|
||||
late MemoryFileSystem memoryFileSystem;
|
||||
@ -359,32 +359,25 @@ tasks.register("clean", Delete) {
|
||||
expect(bufferLogger.traceText, contains(appGradleNotFoundWarning));
|
||||
});
|
||||
|
||||
testWithoutContext('replace when api 16', () {
|
||||
const String minSdkVersion16 = 'minSdkVersion 16';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion16));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(replacementMinSdkText));
|
||||
});
|
||||
|
||||
testWithoutContext('replace when api 17', () {
|
||||
const String minSdkVersion17 = 'minSdkVersion 17';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion17));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(replacementMinSdkText));
|
||||
});
|
||||
|
||||
testWithoutContext('replace when api 18', () {
|
||||
const String minSdkVersion18 = 'minSdkVersion 18';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion18));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(replacementMinSdkText));
|
||||
});
|
||||
|
||||
testWithoutContext('do nothing when >=api 19', () {
|
||||
testWithoutContext('replace when api 19', () {
|
||||
const String minSdkVersion19 = 'minSdkVersion 19';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion19));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(minSdkVersion19));
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(replacementMinSdkText));
|
||||
});
|
||||
|
||||
testWithoutContext('replace when api 20', () {
|
||||
const String minSdkVersion20 = 'minSdkVersion 20';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion20));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(replacementMinSdkText));
|
||||
});
|
||||
|
||||
testWithoutContext('do nothing when >=api 21', () {
|
||||
const String minSdkVersion21 = 'minSdkVersion 21';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion21));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(minSdkVersion21));
|
||||
});
|
||||
|
||||
testWithoutContext('do nothing when already using '
|
||||
@ -395,7 +388,7 @@ tasks.register("clean", Delete) {
|
||||
});
|
||||
|
||||
testWithoutContext('avoid rewriting comments', () {
|
||||
const String code = '// minSdkVersion 16 // old default\n'
|
||||
const String code = '// minSdkVersion 19 // old default\n'
|
||||
' minSdkVersion 23 // new version';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(code));
|
||||
migration.migrate();
|
||||
@ -411,10 +404,10 @@ tasks.register("clean", Delete) {
|
||||
project,
|
||||
bufferLogger
|
||||
);
|
||||
const String minSdkVersion16 = 'minSdkVersion 16';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion16));
|
||||
const String minSdkVersion19 = 'minSdkVersion 19';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(minSdkVersion19));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(minSdkVersion16));
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(minSdkVersion19));
|
||||
});
|
||||
|
||||
testWithoutContext('do nothing when minSdkVersion is set '
|
||||
@ -427,10 +420,10 @@ tasks.register("clean", Delete) {
|
||||
|
||||
testWithoutContext('do nothing when minSdkVersion is set '
|
||||
'using = syntax', () {
|
||||
const String equalsSyntaxMinSdkVersion16 = 'minSdkVersion = 16';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(equalsSyntaxMinSdkVersion16));
|
||||
const String equalsSyntaxMinSdkVersion19 = 'minSdkVersion = 19';
|
||||
project.appGradleFile.writeAsStringSync(sampleModuleGradleBuildFile(equalsSyntaxMinSdkVersion19));
|
||||
migration.migrate();
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(equalsSyntaxMinSdkVersion16));
|
||||
expect(project.appGradleFile.readAsStringSync(), sampleModuleGradleBuildFile(equalsSyntaxMinSdkVersion19));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -42,7 +42,6 @@ void main() {
|
||||
minSdkVersionHandler,
|
||||
transformInputIssueHandler,
|
||||
lockFileDepMissingHandler,
|
||||
multidexErrorHandler,
|
||||
incompatibleKotlinVersionHandler,
|
||||
minCompileSdkVersionHandler,
|
||||
jvm11RequiredHandler,
|
||||
@ -76,7 +75,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -124,7 +122,6 @@ Caused by: java.io.EOFException: SSL peer shut down incorrectly
|
||||
expect(formatTestErrorMessage(errorMessage, remoteTerminatedHandshakeHandler), isTrue);
|
||||
expect(await remoteTerminatedHandshakeHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -156,7 +153,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -189,7 +185,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -215,7 +210,6 @@ Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -257,7 +251,6 @@ Exception in thread "main" javax.net.ssl.SSLHandshakeException: Remote host clos
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -291,7 +284,6 @@ Exception in thread "main" java.io.FileNotFoundException: https://downloads.grad
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -336,7 +328,6 @@ Exception in thread "main" java.net.SocketException: Connection reset
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -368,7 +359,6 @@ A problem occurred configuring root project 'android'.
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -404,7 +394,6 @@ A problem occurred configuring root project 'android'.
|
||||
expect(formatTestErrorMessage(errorMessage, networkErrorHandler), isTrue);
|
||||
expect(await networkErrorHandler.handler(
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
), equals(GradleBuildStatus.retry));
|
||||
@ -420,218 +409,6 @@ A problem occurred configuring root project 'android'.
|
||||
});
|
||||
});
|
||||
|
||||
group('multidex errors', () {
|
||||
testUsingContext('exits if multidex AndroidManifest not detected', () async {
|
||||
const String errorMessage = r'''
|
||||
Caused by: com.android.tools.r8.utils.b: Cannot fit requested classes in a single dex file (# methods: 85091 > 65536)
|
||||
at com.android.tools.r8.utils.T0.error(SourceFile:1)
|
||||
at com.android.tools.r8.utils.T0.a(SourceFile:2)
|
||||
at com.android.tools.r8.dex.P.a(SourceFile:740)
|
||||
at com.android.tools.r8.dex.P$h.a(SourceFile:7)
|
||||
at com.android.tools.r8.dex.b.a(SourceFile:14)
|
||||
at com.android.tools.r8.dex.b.b(SourceFile:25)
|
||||
at com.android.tools.r8.D8.d(D8.java:133)
|
||||
at com.android.tools.r8.D8.b(D8.java:1)
|
||||
at com.android.tools.r8.utils.Y.a(SourceFile:36)
|
||||
... 38 more
|
||||
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Execution failed for task ':app:mergeDexDebug'.
|
||||
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
|
||||
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
|
||||
The number of method references in a .dex file cannot exceed 64K.
|
||||
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html''';
|
||||
|
||||
expect(formatTestErrorMessage(errorMessage, multidexErrorHandler), isTrue);
|
||||
expect(await multidexErrorHandler.handler(project: FlutterProject.fromDirectory(fileSystem.currentDirectory), multidexEnabled: true, usesAndroidX: true, line: ''), equals(GradleBuildStatus.exit));
|
||||
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Multidex support is required for your android app to build since the number of methods has exceeded 64k.'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'See https://docs.flutter.dev/deployment/android#enabling-multidex-support for more information.'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Your `android/app/src/main/AndroidManifest.xml` does not contain'
|
||||
)
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => processManager,
|
||||
});
|
||||
testUsingContext('retries if multidex support enabled', () async {
|
||||
const String errorMessage = r'''
|
||||
Caused by: com.android.tools.r8.utils.b: Cannot fit requested classes in a single dex file (# methods: 85091 > 65536)
|
||||
at com.android.tools.r8.utils.T0.error(SourceFile:1)
|
||||
at com.android.tools.r8.utils.T0.a(SourceFile:2)
|
||||
at com.android.tools.r8.dex.P.a(SourceFile:740)
|
||||
at com.android.tools.r8.dex.P$h.a(SourceFile:7)
|
||||
at com.android.tools.r8.dex.b.a(SourceFile:14)
|
||||
at com.android.tools.r8.dex.b.b(SourceFile:25)
|
||||
at com.android.tools.r8.D8.d(D8.java:133)
|
||||
at com.android.tools.r8.D8.b(D8.java:1)
|
||||
at com.android.tools.r8.utils.Y.a(SourceFile:36)
|
||||
... 38 more
|
||||
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Execution failed for task ':app:mergeDexDebug'.
|
||||
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
|
||||
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
|
||||
The number of method references in a .dex file cannot exceed 64K.
|
||||
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html''';
|
||||
|
||||
final File manifest = fileSystem.currentDirectory
|
||||
.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
manifest.createSync(recursive: true);
|
||||
manifest.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
</manifest>
|
||||
''', flush: true);
|
||||
|
||||
expect(formatTestErrorMessage(errorMessage, multidexErrorHandler), isTrue);
|
||||
expect(await multidexErrorHandler.handler(project: FlutterProject.fromDirectory(fileSystem.currentDirectory), multidexEnabled: true, line: '', usesAndroidX: true), equals(GradleBuildStatus.retry));
|
||||
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Multidex support is required for your android app to build since the number of methods has exceeded 64k.'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java'
|
||||
)
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => processManager,
|
||||
AnsiTerminal: () => _TestPromptTerminal('y'),
|
||||
});
|
||||
|
||||
testUsingContext('exits if multidex support skipped', () async {
|
||||
const String errorMessage = r'''
|
||||
Caused by: com.android.tools.r8.utils.b: Cannot fit requested classes in a single dex file (# methods: 85091 > 65536)
|
||||
at com.android.tools.r8.utils.T0.error(SourceFile:1)
|
||||
at com.android.tools.r8.utils.T0.a(SourceFile:2)
|
||||
at com.android.tools.r8.dex.P.a(SourceFile:740)
|
||||
at com.android.tools.r8.dex.P$h.a(SourceFile:7)
|
||||
at com.android.tools.r8.dex.b.a(SourceFile:14)
|
||||
at com.android.tools.r8.dex.b.b(SourceFile:25)
|
||||
at com.android.tools.r8.D8.d(D8.java:133)
|
||||
at com.android.tools.r8.D8.b(D8.java:1)
|
||||
at com.android.tools.r8.utils.Y.a(SourceFile:36)
|
||||
... 38 more
|
||||
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Execution failed for task ':app:mergeDexDebug'.
|
||||
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
|
||||
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
|
||||
The number of method references in a .dex file cannot exceed 64K.
|
||||
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html''';
|
||||
|
||||
final File manifest = fileSystem.currentDirectory
|
||||
.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
manifest.createSync(recursive: true);
|
||||
manifest.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
</manifest>
|
||||
''', flush: true);
|
||||
|
||||
expect(formatTestErrorMessage(errorMessage, multidexErrorHandler), isTrue);
|
||||
expect(await multidexErrorHandler.handler(project: FlutterProject.fromDirectory(fileSystem.currentDirectory), multidexEnabled: true, line: '', usesAndroidX: true), equals(GradleBuildStatus.exit));
|
||||
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Multidex support is required for your android app to build since the number of methods has exceeded 64k.'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Flutter tool can add multidex support. The following file will be added by flutter:'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java'
|
||||
)
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => processManager,
|
||||
AnsiTerminal: () => _TestPromptTerminal('n'),
|
||||
});
|
||||
|
||||
testUsingContext('exits if multidex support disabled', () async {
|
||||
const String errorMessage = r'''
|
||||
Caused by: com.android.tools.r8.utils.b: Cannot fit requested classes in a single dex file (# methods: 85091 > 65536)
|
||||
at com.android.tools.r8.utils.T0.error(SourceFile:1)
|
||||
at com.android.tools.r8.utils.T0.a(SourceFile:2)
|
||||
at com.android.tools.r8.dex.P.a(SourceFile:740)
|
||||
at com.android.tools.r8.dex.P$h.a(SourceFile:7)
|
||||
at com.android.tools.r8.dex.b.a(SourceFile:14)
|
||||
at com.android.tools.r8.dex.b.b(SourceFile:25)
|
||||
at com.android.tools.r8.D8.d(D8.java:133)
|
||||
at com.android.tools.r8.D8.b(D8.java:1)
|
||||
at com.android.tools.r8.utils.Y.a(SourceFile:36)
|
||||
... 38 more
|
||||
|
||||
|
||||
FAILURE: Build failed with an exception.
|
||||
|
||||
* What went wrong:
|
||||
Execution failed for task ':app:mergeDexDebug'.
|
||||
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
|
||||
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
|
||||
The number of method references in a .dex file cannot exceed 64K.
|
||||
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html''';
|
||||
|
||||
expect(formatTestErrorMessage(errorMessage, multidexErrorHandler), isTrue);
|
||||
expect(await multidexErrorHandler.handler(project: FlutterProject.fromDirectory(fileSystem.currentDirectory), multidexEnabled: false, line: '', usesAndroidX: true), equals(GradleBuildStatus.exit));
|
||||
|
||||
expect(testLogger.statusText,
|
||||
contains(
|
||||
'Flutter multidex handling is disabled.'
|
||||
)
|
||||
);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
ProcessManager: () => processManager,
|
||||
});
|
||||
});
|
||||
|
||||
group('permission errors', () {
|
||||
testUsingContext('throws toolExit if gradle is missing execute permissions', () async {
|
||||
const String errorMessage = '''
|
||||
@ -642,7 +419,6 @@ Command: /home/android/gradlew assembleRelease
|
||||
expect(await permissionDeniedErrorHandler.handler(
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
), equals(GradleBuildStatus.exit));
|
||||
|
||||
@ -675,7 +451,6 @@ Command: /home/android/gradlew assembleRelease
|
||||
expect(await permissionDeniedErrorHandler.handler(
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
), equals(GradleBuildStatus.exit));
|
||||
|
||||
@ -712,7 +487,6 @@ Command: /home/android/gradlew assembleRelease
|
||||
line: 'You have not accepted the license agreements of the following SDK components: [foo, bar]',
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -784,7 +558,6 @@ assembleFooTest
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -834,7 +607,6 @@ assembleProfile
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -860,7 +632,7 @@ assembleProfile
|
||||
});
|
||||
|
||||
group('higher minSdkVersion', () {
|
||||
const String stdoutLine = 'uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:webview_flutter] /tmp/cirrus-ci-build/all_plugins/build/webview_flutter/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 16';
|
||||
const String stdoutLine = 'uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:webview_flutter] /tmp/cirrus-ci-build/all_plugins/build/webview_flutter/intermediates/library_manifest/release/AndroidManifest.xml as the library might be using APIs not available in 21';
|
||||
|
||||
testWithoutContext('pattern', () {
|
||||
expect(
|
||||
@ -874,7 +646,6 @@ assembleProfile
|
||||
line: stdoutLine,
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -886,11 +657,11 @@ assembleProfile
|
||||
'│ Fix this issue by adding the following to the file /android/app/build.gradle: │\n'
|
||||
'│ android { │\n'
|
||||
'│ defaultConfig { │\n'
|
||||
'│ minSdkVersion 19 │\n'
|
||||
'│ minSdkVersion 21 │\n'
|
||||
'│ } │\n'
|
||||
'│ } │\n'
|
||||
'│ │\n'
|
||||
'│ Following this change, your app will not be available to users running Android SDKs below 19. │\n'
|
||||
'│ Following this change, your app will not be available to users running Android SDKs below 21. │\n'
|
||||
'│ Consider searching for a version of this plugin that supports these lower versions of the │\n'
|
||||
'│ Android SDK instead. │\n'
|
||||
'│ For more information, see: │\n'
|
||||
@ -922,7 +693,6 @@ assembleProfile
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -967,7 +737,6 @@ Execution failed for task ':app:generateDebugFeatureTransitiveDeps'.
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -1006,7 +775,6 @@ Execution failed for task ':app:generateDebugFeatureTransitiveDeps'.
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -1048,7 +816,6 @@ A problem occurred evaluating project ':app'.
|
||||
line: errorMessage,
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -1107,7 +874,6 @@ Execution failed for task ':app:checkDebugAarMetadata'.
|
||||
line: errorMessage,
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -1153,7 +919,6 @@ A problem occurred evaluating project ':flutter'.
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(
|
||||
@ -1233,7 +998,6 @@ at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)'''
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(status, GradleBuildStatus.retry);
|
||||
@ -1279,7 +1043,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)'''
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(result, equals(GradleBuildStatus.retry));
|
||||
@ -1305,7 +1068,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)'''
|
||||
project: FakeFlutterProject(),
|
||||
usesAndroidX: true,
|
||||
line: '',
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
expect(result, equals(GradleBuildStatus.retry));
|
||||
@ -1334,7 +1096,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)'''
|
||||
final GradleBuildStatus result = await zipExceptionHandler.handler(
|
||||
line: '',
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
);
|
||||
|
||||
@ -1364,7 +1125,6 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)'''
|
||||
final GradleBuildStatus result = await zipExceptionHandler.handler(
|
||||
line: '',
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
project: FakeFlutterProject(),
|
||||
);
|
||||
|
||||
@ -1406,7 +1166,6 @@ Could not compile build file '…/example/android/build.gradle'.
|
||||
line: errorMessage,
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
|
||||
// Ensure the error notes the incompatible Gradle/AGP/Java versions, links to related resources,
|
||||
@ -1438,7 +1197,6 @@ A problem occurred evaluating script.
|
||||
> Failed to create Jar file /Volumes/Work/s/w/ir/cache/gradle/caches/6.7/generated-gradle-jars/gradle-api-6.7.jar.''',
|
||||
project: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
|
||||
usesAndroidX: true,
|
||||
multidexEnabled: true,
|
||||
);
|
||||
expect(testLogger.errorText, contains('Gradle threw an error while resolving dependencies'));
|
||||
expect(status, GradleBuildStatus.retry);
|
||||
|
@ -1,213 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_tools/src/android/multidex.dart';
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
|
||||
import '../../src/common.dart';
|
||||
import '../../src/context.dart';
|
||||
|
||||
void main() {
|
||||
testUsingContext('ensureMultidexUtilsExists patches file when invalid', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childDirectory('java')
|
||||
.childDirectory('io')
|
||||
.childDirectory('flutter')
|
||||
.childDirectory('app')
|
||||
.childFile('FlutterMultiDexApplication.java');
|
||||
applicationFile.createSync(recursive: true);
|
||||
applicationFile.writeAsStringSync('hello', flush: true);
|
||||
expect(applicationFile.readAsStringSync(), 'hello');
|
||||
|
||||
ensureMultiDexApplicationExists(directory);
|
||||
|
||||
// File should remain untouched
|
||||
expect(applicationFile.readAsStringSync(), '''
|
||||
// Generated file.
|
||||
//
|
||||
// If you wish to remove Flutter's multidex support, delete this entire file.
|
||||
//
|
||||
// Modifications to this file should be done in a copy under a different name
|
||||
// as this file may be regenerated.
|
||||
|
||||
package io.flutter.app;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
/**
|
||||
* Extension of {@link android.app.Application}, adding multidex support.
|
||||
*/
|
||||
public class FlutterMultiDexApplication extends Application {
|
||||
@Override
|
||||
@CallSuper
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
MultiDex.install(this);
|
||||
}
|
||||
}
|
||||
''');
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('ensureMultiDexApplicationExists generates when does not exist', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childDirectory('java')
|
||||
.childDirectory('io')
|
||||
.childDirectory('flutter')
|
||||
.childDirectory('app')
|
||||
.childFile('FlutterMultiDexApplication.java');
|
||||
|
||||
ensureMultiDexApplicationExists(directory);
|
||||
|
||||
final String contents = applicationFile.readAsStringSync();
|
||||
expect(contents.contains('FlutterMultiDexApplication'), true);
|
||||
expect(contents.contains('MultiDex.install(this);'), true);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('multiDexApplicationExists false when does not exist', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
expect(multiDexApplicationExists(directory), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('multiDexApplicationExists true when does exist', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File utilsFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childDirectory('java')
|
||||
.childDirectory('io')
|
||||
.childDirectory('flutter')
|
||||
.childDirectory('app')
|
||||
.childFile('FlutterMultiDexApplication.java');
|
||||
utilsFile.createSync(recursive: true);
|
||||
|
||||
expect(multiDexApplicationExists(directory), true);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('androidManifestHasNameVariable true with valid manifest', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
applicationFile.createSync(recursive: true);
|
||||
applicationFile.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
</manifest>
|
||||
''', flush: true);
|
||||
expect(androidManifestHasNameVariable(directory), true);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('androidManifestHasNameVariable false with no android:name attribute', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
applicationFile.createSync(recursive: true);
|
||||
applicationFile.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
''', flush: true);
|
||||
expect(androidManifestHasNameVariable(directory), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('androidManifestHasNameVariable false with incorrect android:name attribute', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
applicationFile.createSync(recursive: true);
|
||||
applicationFile.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
''', flush: true);
|
||||
expect(androidManifestHasNameVariable(directory), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('androidManifestHasNameVariable false with invalid xml manifest', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
final File applicationFile = directory.childDirectory('android')
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('main')
|
||||
.childFile('AndroidManifest.xml');
|
||||
applicationFile.createSync(recursive: true);
|
||||
applicationFile.writeAsStringSync(r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidexapp">
|
||||
<application
|
||||
android:label="multidextest2"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
</application>
|
||||
''', flush: true);
|
||||
expect(androidManifestHasNameVariable(directory), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('androidManifestHasNameVariable false with no manifest file', () async {
|
||||
final Directory directory = globals.fs.currentDirectory;
|
||||
expect(androidManifestHasNameVariable(directory), false);
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:file/file.dart';
|
||||
import 'package:flutter_tools/src/base/io.dart';
|
||||
|
||||
import '../src/common.dart';
|
||||
import 'test_data/multidex_project.dart';
|
||||
import 'test_driver.dart';
|
||||
import 'test_utils.dart';
|
||||
|
||||
void main() {
|
||||
late Directory tempDir;
|
||||
late FlutterRunTestDriver flutter;
|
||||
|
||||
setUp(() async {
|
||||
tempDir = createResolvedTempDirectorySync('run_test.');
|
||||
flutter = FlutterRunTestDriver(tempDir);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
await flutter.stop();
|
||||
tryToDelete(tempDir);
|
||||
});
|
||||
|
||||
testWithoutContext('simple build apk succeeds', () async {
|
||||
final MultidexProject project = MultidexProject(true);
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'apk',
|
||||
'--debug',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result, const ProcessResultMatcher(stdoutPattern: 'app-debug.apk'));
|
||||
});
|
||||
|
||||
testWithoutContext('simple build apk without FlutterMultiDexApplication fails', () async {
|
||||
final MultidexProject project = MultidexProject(false);
|
||||
await project.setUpIn(tempDir);
|
||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await processManager.run(<String>[
|
||||
flutterBin,
|
||||
...getLocalEngineArguments(),
|
||||
'build',
|
||||
'apk',
|
||||
'--debug',
|
||||
], workingDirectory: tempDir.path);
|
||||
|
||||
expect(result, const ProcessResultMatcher(exitCode: 1));
|
||||
expect(result.stderr.toString(), contains('Cannot fit requested classes in a single dex file'));
|
||||
expect(result.stderr.toString(), contains('The number of method references in a .dex file cannot exceed 64K.'));
|
||||
});
|
||||
}
|
@ -87,7 +87,7 @@ class DeferredComponentModule {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
@ -1,309 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:file/file.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
import '../test_utils.dart';
|
||||
import 'project.dart';
|
||||
|
||||
class MultidexProject extends Project {
|
||||
MultidexProject(this.includeFlutterMultiDexApplication);
|
||||
|
||||
@override
|
||||
Future<void> setUpIn(Directory dir, {
|
||||
bool useDeferredLoading = false,
|
||||
bool useSyntheticPackage = false,
|
||||
}) {
|
||||
this.dir = dir;
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'settings.gradle'), androidSettings);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'build.gradle'), androidBuild);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'local.properties'), androidLocalProperties);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'gradle.properties'), androidGradleProperties);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'build.gradle'), appBuild);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'AndroidManifest.xml'), appManifest);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'values', 'strings.xml'), appStrings);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'values', 'styles.xml'), appStyles);
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'res', 'drawable', 'launch_background.xml'), appLaunchBackground);
|
||||
if (includeFlutterMultiDexApplication) {
|
||||
writeFile(fileSystem.path.join(dir.path, 'android', 'app', 'src', 'main', 'java', fileSystem.path.join('io', 'flutter', 'app', 'FlutterMultiDexApplication.java')), appMultidexApplication);
|
||||
}
|
||||
return super.setUpIn(dir);
|
||||
}
|
||||
|
||||
final bool includeFlutterMultiDexApplication;
|
||||
|
||||
@override
|
||||
final String pubspec = '''
|
||||
name: test
|
||||
environment:
|
||||
sdk: '>=3.2.0-0 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
# Pin to specific plugin versions to avoid out-of-band failures.
|
||||
cloud_firestore: 2.5.3
|
||||
firebase_core: 1.6.0
|
||||
''';
|
||||
|
||||
@override
|
||||
final String main = r'''
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
home: Container(),
|
||||
);
|
||||
}
|
||||
}
|
||||
''';
|
||||
|
||||
String get androidSettings => r'''
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
''';
|
||||
|
||||
String get androidBuild => r'''
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.7.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
''';
|
||||
|
||||
String get appBuild => r'''
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdk 34
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.multidextest2"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 33
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
||||
''';
|
||||
|
||||
String get androidLocalProperties => '''
|
||||
flutter.sdk=${getFlutterRoot()}
|
||||
flutter.buildMode=debug
|
||||
flutter.versionName=1.0.0
|
||||
flutter.versionCode=22
|
||||
''';
|
||||
|
||||
String get androidGradleProperties => '''
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enableR8=true
|
||||
android.experimental.enableNewResourceShrinker=true
|
||||
''';
|
||||
|
||||
String get appManifest => r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.multidextest">
|
||||
<application
|
||||
android:label="multidextest"
|
||||
android:name="${applicationName}">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
''';
|
||||
|
||||
String get appStrings => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
''';
|
||||
|
||||
String get appStyles => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
''';
|
||||
|
||||
String get appLaunchBackground => r'''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
''';
|
||||
|
||||
String get appMultidexApplication => r'''
|
||||
// Generated file.
|
||||
//
|
||||
// If you wish to remove Flutter's multidex support, delete this entire file.
|
||||
//
|
||||
// Modifications to this file should be done in a copy under a different name
|
||||
// as this file may be regenerated.
|
||||
|
||||
package io.flutter.app;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
/**
|
||||
* Extension of {@link android.app.Application}, adding multidex support.
|
||||
*/
|
||||
public class FlutterMultiDexApplication extends Application {
|
||||
@Override
|
||||
@CallSuper
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
MultiDex.install(this);
|
||||
}
|
||||
}
|
||||
''';
|
||||
}
|
@ -43,7 +43,7 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
minSdkVersion 21
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'lib-proguard-rules.txt'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user