diff --git a/bin/internal/update_dart_sdk.sh b/bin/internal/update_dart_sdk.sh index 8aed2f4786..8d7b3adf56 100755 --- a/bin/internal/update_dart_sdk.sh +++ b/bin/internal/update_dart_sdk.sh @@ -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 diff --git a/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle b/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle index 0fd2d97b13..4ffe02f0b3 100644 --- a/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle +++ b/dev/integration_tests/android_custom_host_app/SampleApp/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "io.flutter.add2app" - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 33 versionCode 1 versionName "1.0" diff --git a/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle b/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle index 8b1a63e533..190a426f77 100644 --- a/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle +++ b/dev/integration_tests/android_host_app_v2_embedding/app/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "io.flutter.add2app" - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 33 versionCode 1 versionName "1.0" diff --git a/dev/integration_tests/deferred_components_test/android/component1/build.gradle b/dev/integration_tests/deferred_components_test/android/component1/build.gradle index 7738c7109d..1f20e08f0e 100644 --- a/dev/integration_tests/deferred_components_test/android/component1/build.gradle +++ b/dev/integration_tests/deferred_components_test/android/component1/build.gradle @@ -34,7 +34,7 @@ android { } defaultConfig { - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/dev/integration_tests/flutter_gallery/android/project-app.lockfile b/dev/integration_tests/flutter_gallery/android/project-app.lockfile index 7ba3afe22c..0f4e9965ca 100644 --- a/dev/integration_tests/flutter_gallery/android/project-app.lockfile +++ b/dev/integration_tests/flutter_gallery/android/project-app.lockfile @@ -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 diff --git a/dev/integration_tests/flutter_gallery/android/project-video_player_android.lockfile b/dev/integration_tests/flutter_gallery/android/project-video_player_android.lockfile index 32dfc5d669..7f427361f2 100644 --- a/dev/integration_tests/flutter_gallery/android/project-video_player_android.lockfile +++ b/dev/integration_tests/flutter_gallery/android/project-video_player_android.lockfile @@ -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 diff --git a/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle b/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle index 7a2741f374..50b5f9c9fd 100644 --- a/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle +++ b/dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle @@ -14,7 +14,7 @@ android { defaultConfig { applicationId "io.flutter.addtoapp" - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 33 versionCode 1 versionName "1.0" diff --git a/examples/api/android/app/build.gradle b/examples/api/android/app/build.gradle index aaad659960..11eb9f92ad 100644 --- a/examples/api/android/app/build.gradle +++ b/examples/api/android/app/build.gradle @@ -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' diff --git a/examples/api/android/app/src/main/AndroidManifest.xml b/examples/api/android/app/src/main/AndroidManifest.xml index c284af112c..bd054a0af8 100644 --- a/examples/api/android/app/src/main/AndroidManifest.xml +++ b/examples/api/android/app/src/main/AndroidManifest.xml @@ -5,7 +5,6 @@ found in the LICENSE file. --> { 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") diff --git a/packages/flutter_tools/gradle/src/main/kotlin/flutter.gradle.kts b/packages/flutter_tools/gradle/src/main/kotlin/flutter.gradle.kts index 78bcafb97b..9070d285ee 100644 --- a/packages/flutter_tools/gradle/src/main/kotlin/flutter.gradle.kts +++ b/packages/flutter_tools/gradle/src/main/kotlin/flutter.gradle.kts @@ -10,21 +10,13 @@ class FlutterPluginKts : Plugin { 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() - } - // Setting to android.app.Application is the same as omitting the attribute. - getProperty("manifestPlaceholders").withGroovyBuilder { - setProperty("applicationName", baseApplicationName) - } + var baseApplicationName: String = "android.app.Application" + if (project.hasProperty("base-application-name")) { + baseApplicationName = project.property("base-application-name").toString() + } + // Setting to android.app.Application is the same as omitting the attribute. + getProperty("manifestPlaceholders").withGroovyBuilder { + setProperty("applicationName", baseApplicationName) } } } diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index e583ce397f..86fdaace70 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -587,7 +587,6 @@ class AndroidDevice extends Device { debuggingOptions.buildInfo, targetArchs: [androidArch], fastStart: debuggingOptions.fastStart, - multidexEnabled: (platformArgs['multidex'] as bool?) ?? false, ), ); // Package has been built, so we can get the updated application ID and diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index 50f5ffcd96..1b60f4eb19 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart @@ -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) { diff --git a/packages/flutter_tools/lib/src/android/gradle_errors.dart b/packages/flutter_tools/lib/src/android/gradle_errors.dart index 4246751cff..75fb68a620 100644 --- a/packages/flutter_tools/lib/src/android/gradle_errors.dart +++ b/packages/flutter_tools/lib/src/android/gradle_errors.dart @@ -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 gradleErrors = [ minSdkVersionHandler, transformInputIssueHandler, lockFileDepMissingHandler, - multidexErrorHandler, incompatibleKotlinVersionHandler, minCompileSdkVersionHandler, jvm11RequiredHandler, @@ -88,102 +85,6 @@ final List gradleErrors = [ const String _boxTitle = 'Flutter Fix'; -// Multidex error message. -@visibleForTesting -final GradleHandledError multidexErrorHandler = GradleHandledError( - test: _lineMatcher(const [ - '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''' - -''', - 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( - ['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( [ @@ -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} ' diff --git a/packages/flutter_tools/lib/src/android/gradle_utils.dart b/packages/flutter_tools/lib/src/android/gradle_utils.dart index ebc177798c..4bec2eaa72 100644 --- a/packages/flutter_tools/lib/src/android/gradle_utils.dart +++ b/packages/flutter_tools/lib/src/android/gradle_utils.dart @@ -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'; diff --git a/packages/flutter_tools/lib/src/android/migrations/min_sdk_version_migration.dart b/packages/flutter_tools/lib/src/android/migrations/min_sdk_version_migration.dart index d7d4cd1fc0..c890ebdabf 100644 --- a/packages/flutter_tools/lib/src/android/migrations/min_sdk_version_migration.dart +++ b/packages/flutter_tools/lib/src/android/migrations/min_sdk_version_migration.dart @@ -42,6 +42,8 @@ class MinSdkVersionMigration extends ProjectMigrator { @override String migrateFileContents(String fileContents) { - return fileContents.replaceAll(jellyBeanMinSdkVersionMatch, replacementMinSdkText); + return fileContents.replaceAll( + tooOldMinSdkVersionMatch, replacementMinSdkText, + ); } } diff --git a/packages/flutter_tools/lib/src/android/multidex.dart b/packages/flutter_tools/lib/src/android/multidex.dart deleted file mode 100644 index 821f912785..0000000000 --- a/packages/flutter_tools/lib/src/android/multidex.dart +++ /dev/null @@ -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 -/// 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; -} diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart index f50019b9a9..6b107e10ab 100644 --- a/packages/flutter_tools/lib/src/build_info.dart +++ b/packages/flutter_tools/lib/src/build_info.dart @@ -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. diff --git a/packages/flutter_tools/lib/src/commands/build_apk.dart b/packages/flutter_tools/lib/src/commands/build_apk.dart index b9fb98c84a..7be4556654 100644 --- a/packages/flutter_tools/lib/src/commands/build_apk.dart +++ b/packages/flutter_tools/lib/src/commands/build_apk.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(getAndroidArchForName), - multidexEnabled: boolArg('multidex'), ); validateBuild(androidBuildInfo); displayNullSafetyMode(androidBuildInfo.buildInfo); diff --git a/packages/flutter_tools/lib/src/commands/build_appbundle.dart b/packages/flutter_tools/lib/src/commands/build_appbundle.dart index 5ad613b2dd..9b299bb5aa 100644 --- a/packages/flutter_tools/lib/src/commands/build_appbundle.dart +++ b/packages/flutter_tools/lib/src/commands/build_appbundle.dart @@ -42,7 +42,6 @@ class BuildAppBundleCommand extends BuildSubCommand { addEnableExperimentation(hide: !verboseHelp); usesAnalyzeSizeFlag(); addAndroidSpecificBuildOptions(hide: !verboseHelp); - addMultidexOption(); addIgnoreDeprecationOption(); argParser.addMultiOption('target-platform', defaultsTo: ['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(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. diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index 10ed234534..435cf7eeac 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart @@ -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, ); } diff --git a/packages/flutter_tools/lib/src/commands/drive.dart b/packages/flutter_tools/lib/src/commands/drive.dart index 052d888a14..379afa690b 100644 --- a/packages/flutter_tools/lib/src/commands/drive.dart +++ b/packages/flutter_tools/lib/src/commands/drive.dart @@ -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 { diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 73bd2893bd..54fa2c4f30 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -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), ); diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 87ce7b7222..c96948452a 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -455,9 +455,7 @@ class FlutterDevice { } devFSWriter = device!.createDevFSWriter(applicationPackage, userIdentifier); - final Map platformArgs = { - 'multidex': hotRunner.multidexEnabled, - }; + final Map platformArgs = {}; await startEchoingDeviceLog(hotRunner.debuggingOptions); @@ -525,7 +523,6 @@ class FlutterDevice { final Map platformArgs = {}; platformArgs['trace-startup'] = coldRunner.traceStartup; - platformArgs['multidex'] = coldRunner.multidexEnabled; await startEchoingDeviceLog(coldRunner.debuggingOptions); diff --git a/packages/flutter_tools/lib/src/run_cold.dart b/packages/flutter_tools/lib/src/run_cold.dart index cbd83bed03..63ac8dc2d7 100644 --- a/packages/flutter_tools/lib/src/run_cold.dart +++ b/packages/flutter_tools/lib/src/run_cold.dart @@ -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 diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index 91252605e9..12d8aafc0e 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart @@ -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 diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index f9a15b2ce3..ee8a2104d1 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -1015,15 +1015,6 @@ abstract class FlutterCommand extends Command { ); } - 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, diff --git a/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart index 7f3a63c8a4..3d14b0a5b3 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/run_test.dart @@ -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]; - - await expectLater( - () => createTestCommandRunner(command).run([ - 'run', - '--no-pub', - '--machine', - '-d', - device.id, - ]), - throwsToolExit(), - ); - expect(command.appDomain.multidexEnabled, isTrue); - }, overrides: { - 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]; - - await expectLater( - () => createTestCommandRunner(command).run([ - 'run', - '--no-pub', - '--no-multidex', - '--machine', - '-d', - device.id, - ]), - throwsToolExit(), - ); - expect(command.appDomain.multidexEnabled, isFalse); - }, overrides: { - 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(''); diff --git a/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart b/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart index 940637ce79..124da18267 100644 --- a/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart +++ b/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart @@ -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; }, diff --git a/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart b/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart index 2d28c6bd2d..500b6f2a33 100644 --- a/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart +++ b/packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart @@ -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)); }); }); }); diff --git a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart index 307224d11a..f07f31e192 100644 --- a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart +++ b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart @@ -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: { - 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''' - - - - -''', 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: { - 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''' - - - - -''', 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: { - 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: { - 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); diff --git a/packages/flutter_tools/test/general.shard/android/multidex_test.dart b/packages/flutter_tools/test/general.shard/android/multidex_test.dart deleted file mode 100644 index 11cf202725..0000000000 --- a/packages/flutter_tools/test/general.shard/android/multidex_test.dart +++ /dev/null @@ -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: { - 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: { - 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: { - 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: { - 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''' - - - - -''', flush: true); - expect(androidManifestHasNameVariable(directory), true); - }, overrides: { - 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''' - - - -''', flush: true); - expect(androidManifestHasNameVariable(directory), false); - }, overrides: { - 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''' - - - -''', flush: true); - expect(androidManifestHasNameVariable(directory), false); - }, overrides: { - 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''' - - - -''', flush: true); - expect(androidManifestHasNameVariable(directory), false); - }, overrides: { - 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: { - FileSystem: () => MemoryFileSystem.test(), - ProcessManager: () => FakeProcessManager.any(), - }); -} diff --git a/packages/flutter_tools/test/integration.shard/multidex_build_test.dart b/packages/flutter_tools/test/integration.shard/multidex_build_test.dart deleted file mode 100644 index b3e838aa27..0000000000 --- a/packages/flutter_tools/test/integration.shard/multidex_build_test.dart +++ /dev/null @@ -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([ - 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([ - 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.')); - }); -} diff --git a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart index 3f0219094d..05dfabfc3f 100644 --- a/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart +++ b/packages/flutter_tools/test/integration.shard/test_data/deferred_components_config.dart @@ -87,7 +87,7 @@ class DeferredComponentModule { } defaultConfig { - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart b/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart deleted file mode 100644 index 0f7c708043..0000000000 --- a/packages/flutter_tools/test/integration.shard/test_data/multidex_project.dart +++ /dev/null @@ -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 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''' - - - - - - - - - - - - - - - '''; - - String get appStrings => r''' - - - - '''; - - String get appStyles => r''' - - - - - - - - '''; - - String get appLaunchBackground => r''' - - - - - - - - - '''; - - 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); - } - } - '''; -} diff --git a/packages/integration_test/android/build.gradle b/packages/integration_test/android/build.gradle index 2323c87695..c31e0fb81b 100644 --- a/packages/integration_test/android/build.gradle +++ b/packages/integration_test/android/build.gradle @@ -43,7 +43,7 @@ android { } defaultConfig { - minSdkVersion 19 + minSdkVersion 21 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'lib-proguard-rules.txt' }