Skip to content

Commit ff50172

Browse files
author
Gray Mackall
committed
Revert "Reverts "Update template/test compileSdk, targetSdk, ndk versions (flutter#152487)" (flutter#153793)"
This reverts commit 7730f29.
1 parent 7730f29 commit ff50172

File tree

51 files changed

+403
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+403
-280
lines changed

dev/benchmarks/microbenchmarks/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

dev/benchmarks/microbenchmarks/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pluginManagement {
2323

2424
plugins {
2525
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
26-
id "com.android.application" version "7.3.0" apply false
27-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
26+
id "com.android.application" version "8.1.0" apply false
27+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2828
}
2929

3030
include ":app"

dev/benchmarks/multiple_flutters/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
mavenCentral()
1111
}
1212
dependencies {
13-
classpath "com.android.tools.build:gradle:7.3.0"
13+
classpath "com.android.tools.build:gradle:8.1.0"
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515

1616
// Do not place your application dependencies here; they belong

dev/benchmarks/multiple_flutters/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

dev/devicelab/bin/tasks/android_java11_dependency_smoke_tests.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,22 @@ List<VersionTuple> versionTuples = <VersionTuple>[
2525

2626
// This test requires a Java version less than 17 due to the intentionally low
2727
// version of Gradle. We choose 11 because this was the primary version used in
28-
// CI before 17, and hence it is also hosted on CIPD.
28+
// CI before 17, and hence it is also hosted on CIPD. It also overrides to
29+
// compileSdkVersion 34 because compileSdk 35 requires AGP 8.0+.
2930
// https://docs.gradle.org/current/userguide/compatibility.html
3031
Future<void> main() async {
3132
/// The [FileSystem] for the integration test environment.
3233
const LocalFileSystem fileSystem = LocalFileSystem();
3334

34-
final Directory tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_android_dependency_version_tests');
35+
final Directory tempDir = fileSystem
36+
.systemTempDirectory
37+
.createTempSync('flutter_android_dependency_version_tests');
3538
await task(() {
36-
return buildFlutterApkWithSpecifiedDependencyVersions(versionTuples: versionTuples, tempDir: tempDir, localFileSystem: fileSystem);
39+
return buildFlutterApkWithSpecifiedDependencyVersions(
40+
versionTuples: versionTuples,
41+
compileSdkOverride: '34',
42+
tempDir: tempDir,
43+
localFileSystem: fileSystem
44+
);
3745
});
3846
}

dev/devicelab/bin/tasks/module_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class ModuleTest {
449449
Future<void> main() async {
450450
await task(combine(<TaskFunction>[
451451
// ignore: avoid_redundant_argument_values
452-
ModuleTest('module-gradle-7.6', gradleVersion: '7.6.3').call,
453-
ModuleTest('module-gradle-7.6', gradleVersion: '7.6-rc-2').call,
452+
ModuleTest('module-gradle-7.6', gradleVersion: '8.4').call,
453+
ModuleTest('module-gradle-7.6', gradleVersion: '8.4-rc-3').call,
454454
]));
455455
}

dev/devicelab/lib/framework/dependency_smoke_test_task_definition.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-GRADLE_REPLACE
5858
''';
5959

6060
const String gradleReplacementString = 'GRADLE_REPLACE_ME';
61+
const String flutterCompileSdkString = 'flutter.compileSdkVersion';
6162

6263
/// A simple class containing a Kotlin, Gradle, and AGP version.
6364
class VersionTuple {
@@ -87,6 +88,7 @@ class VersionTuple {
8788
/// fails, returns a successful result otherwise. Cleans up in either case.
8889
Future<TaskResult> buildFlutterApkWithSpecifiedDependencyVersions({
8990
required List<VersionTuple> versionTuples,
91+
String? compileSdkOverride,
9092
required Directory tempDir,
9193
required LocalFileSystem localFileSystem,}) async {
9294
for (final VersionTuple versions in versionTuples) {
@@ -105,6 +107,14 @@ Future<TaskResult> buildFlutterApkWithSpecifiedDependencyVersions({
105107

106108
final String appPath = '${innerTempDir.absolute.path}/dependency_checker_app';
107109

110+
if (compileSdkOverride != null) {
111+
final File appGradleBuild = localFileSystem.file(localFileSystem.path.join(
112+
appPath, 'android', 'app', 'build.gradle'));
113+
final String appBuildContent = appGradleBuild.readAsStringSync()
114+
.replaceFirst(flutterCompileSdkString, compileSdkOverride);
115+
appGradleBuild.writeAsStringSync(appBuildContent);
116+
}
117+
108118
// Modify gradle version to passed in version.
109119
final File gradleWrapperProperties = localFileSystem.file(localFileSystem.path.join(
110120
appPath, 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties'));

dev/integration_tests/android_custom_host_app/SampleApp/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
apply plugin: 'com.android.application'
66

77
android {
8+
namespace = "io.flutter.add2app"
89
compileSdk 34
910

1011
compileOptions {

dev/integration_tests/android_custom_host_app/SampleApp/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Use of this source code is governed by a BSD-style license that can be
33
found in the LICENSE file. -->
44

55
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
6-
xmlns:tools="http://schemas.android.com/tools"
7-
package="io.flutter.add2app">
6+
xmlns:tools="http://schemas.android.com/tools">
87

98
<application android:allowBackup="false"
109
tools:ignore="GoogleAppIndexingWarning,MissingApplicationIcon">

dev/integration_tests/android_custom_host_app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.3.0'
11+
classpath 'com.android.tools.build:gradle:8.1.0'
1212
}
1313
}
1414

0 commit comments

Comments
 (0)