[Android] Bump template AGP and NDK versions (#116536)

* Bump versions

* Fix gradle errors test
This commit is contained in:
Camille Simon 2022-12-20 14:51:10 -08:00 committed by GitHub
parent fdd2d7d64a
commit de357647be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View file

@ -27,7 +27,11 @@ import org.gradle.api.tasks.bundling.Jar
import org.gradle.internal.os.OperatingSystem
import org.gradle.util.VersionNumber
/** For apps only. Provides the flutter extension used in app/build.gradle. */
/** For apps only. Provides the flutter extension used in app/build.gradle.
* The versions specified here should match the values used in
* ../lib/src/android/gradle_utils.dart, so when bumping, make sure to update
* the versions specified there.
*/
class FlutterExtension {
/** Sets the compileSdkVersion used by default in Flutter app projects. */
static int compileSdkVersion = 33
@ -61,7 +65,9 @@ buildscript {
mavenCentral()
}
dependencies {
/* When bumping, also update ndkVersion above. */
/** When bumping, also update ndkVersion above, as well as the Android Gradle Plugin
* version in ../lib/src/android/gradle_utils.dart.
*/
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

View file

@ -28,8 +28,8 @@ import 'android_sdk.dart';
// https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// https://kotlinlang.org/docs/releases.html#release-details
const String templateDefaultGradleVersion = '7.5';
const String templateAndroidGradlePluginVersion = '7.2.0';
const String templateDefaultGradleVersionForModule = '7.2.0';
const String templateAndroidGradlePluginVersion = '7.3.0';
const String templateDefaultGradleVersionForModule = '7.3.0';
const String templateKotlinGradlePluginVersion = '1.7.10';
// These versions should match the values in flutter.gradle (FlutterExtension).
@ -41,7 +41,7 @@ const String templateKotlinGradlePluginVersion = '1.7.10';
const String compileSdkVersion = '31';
const String minSdkVersion = '16';
const String targetSdkVersion = '31';
const String ndkVersion = '21.4.7075529';
const String ndkVersion = '23.1.7779620';
final RegExp _androidPluginRegExp = RegExp(r'com\.android\.tools\.build:gradle:(\d+\.\d+\.\d+)');

View file

@ -979,7 +979,7 @@ A problem occurred evaluating project ':app'.
'│ To fix this issue, replace the following content: │\n'
'│ /android/build.gradle: │\n'
"│ - classpath 'com.android.tools.build:gradle:<current-version>' │\n"
"│ + classpath 'com.android.tools.build:gradle:7.2.0' │\n"
"│ + classpath 'com.android.tools.build:gradle:7.3.0' │\n"
'│ /android/gradle/wrapper/gradle-wrapper.properties: │\n'
'│ - https://services.gradle.org/distributions/gradle-<current-version>-all.zip │\n'
'│ + https://services.gradle.org/distributions/gradle-7.5-all.zip │\n'