flutter/packages/integration_test/android/build.gradle
Zachary Anderson 6a6874ecf9
Update Android minSdkVersion to 21 (#142267)
This PR increases Android's `minSdkVersion` to 21.

There are two changes in this PR aside from simply increasing the number
from 19 to 21 everywhere.

First, tests using `flutter_gallery` fail without updating the
lockfiles. The changes in the PR are the results of running
`dev/tools/bin/generate_gradle_lockfiles.dart` on that app.

Second, from
[here](https://developer.android.com/build/multidex#mdex-pre-l):
> if your minSdkVersion is 21 or higher, multidex is enabled by default
and you don't need the multidex library.

As a result, the `multidex` option everywhere is obsolete. This PR
removes all logic and tests related to that option that I could find.
`Google testing` and `customer_tests` pass on this PR, so it seems like
this won't be too breaking if it is at all. If needed I'll give this
some time to bake in the framework before landing the flutter/engine
PRs.

Context: https://github.com/flutter/flutter/issues/138117,
https://github.com/flutter/flutter/issues/141277, b/319373605
2024-01-29 09:49:09 -08:00

65 lines
1.7 KiB
Groovy

// 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.
group 'dev.flutter.plugins.integration_test'
version '1.0-SNAPSHOT'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
// project.getTasks().withType(JavaCompile){
// options.compilerArgs << "-Xlint:all" << "-Werror"
// }
apply plugin: 'com.android.library'
android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'dev.flutter.integration_test'
}
compileSdk 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'lib-proguard-rules.txt'
}
dependencies {
// TODO(egarciad): These dependencies should not be added to release builds.
// https://github.com/flutter/flutter/issues/56591
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-inline:5.0.0'
// https://developer.android.com/jetpack/androidx/releases/test/#1.2.0
api 'androidx.test:runner:1.2.0'
api 'androidx.test:rules:1.2.0'
api 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.guava:guava:28.1-android'
}
}