Skip to content

Commit 60837f3

Browse files
auto-submit[bot]Buchimi
authored andcommitted
Reverts "Update template/test compileSdk, targetSdk, ndk versions (flutter#152487)" (flutter#153793)
Reverts: flutter#152487 Initiated by: gmackall Reason for reverting: I forgot that I need to override the compileSdkVersion in the AGP 8.0 [instance of this test](https://github.com/flutter/flutter/blob/ef9cd32f5a2c0e27300fb9f4662d11da976087d7/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart#L19) Original PR Author: gmackall Reviewed By: {reidbaker} This change reverts the following previous change: Updates `compileSdk`, `targetSdk`, and `ndk` versions (former 2 to latest, latter to the version of the ndk we are hosting on CIPD). Summary of changes: - Updates mentioned template values - `compileSdk` 35 requires AGP 8.0+, so updated to 8.1 in many places. - This also necessitated Gradle upgrades in most places - This also necessitated moving the `package` xml attribute to the AGP `namespace` field in a couple places (test + template). - Some tests use the output of `flutter create` but then use intentionally lower AGP versions. [I downgraded the `compileSdk` in these tests.](flutter@fee34fd) - [Stopped lockfile generation](flutter@82324a2) script from hitting the `hello_world` example because it uses `.kts` gradle files. - One test needed [some Gradle options we had already added to templates](flutter@6aa187b).
1 parent 5c7678c commit 60837f3

File tree

51 files changed

+280
-403
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

+280
-403
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-8.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-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 "8.1.0" apply false
27-
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
26+
id "com.android.application" version "7.3.0" apply false
27+
id "org.jetbrains.kotlin.android" version "1.7.10" 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:8.1.0"
13+
classpath "com.android.tools.build:gradle:7.3.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-8.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

dev/devicelab/bin/tasks/android_java11_dependency_smoke_tests.dart

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,14 @@ 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. It also overrides to
29-
// compileSdkVersion 34 because compileSdk 35 requires AGP 8.0+.
28+
// CI before 17, and hence it is also hosted on CIPD.
3029
// https://docs.gradle.org/current/userguide/compatibility.html
3130
Future<void> main() async {
3231
/// The [FileSystem] for the integration test environment.
3332
const LocalFileSystem fileSystem = LocalFileSystem();
3433

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

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: '8.4').call,
453-
ModuleTest('module-gradle-7.6', gradleVersion: '8.4-rc-3').call,
452+
ModuleTest('module-gradle-7.6', gradleVersion: '7.6.3').call,
453+
ModuleTest('module-gradle-7.6', gradleVersion: '7.6-rc-2').call,
454454
]));
455455
}

dev/devicelab/lib/framework/dependency_smoke_test_task_definition.dart

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

6060
const String gradleReplacementString = 'GRADLE_REPLACE_ME';
61-
const String flutterCompileSdkString = 'flutter.compileSdkVersion';
6261

6362
/// A simple class containing a Kotlin, Gradle, and AGP version.
6463
class VersionTuple {
@@ -88,7 +87,6 @@ class VersionTuple {
8887
/// fails, returns a successful result otherwise. Cleans up in either case.
8988
Future<TaskResult> buildFlutterApkWithSpecifiedDependencyVersions({
9089
required List<VersionTuple> versionTuples,
91-
String? compileSdkOverride,
9290
required Directory tempDir,
9391
required LocalFileSystem localFileSystem,}) async {
9492
for (final VersionTuple versions in versionTuples) {
@@ -107,14 +105,6 @@ Future<TaskResult> buildFlutterApkWithSpecifiedDependencyVersions({
107105

108106
final String appPath = '${innerTempDir.absolute.path}/dependency_checker_app';
109107

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-
118108
// Modify gradle version to passed in version.
119109
final File gradleWrapperProperties = localFileSystem.file(localFileSystem.path.join(
120110
appPath, 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties'));

dev/integration_tests/android_custom_host_app/SampleApp/build.gradle

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

77
android {
8-
namespace = "io.flutter.add2app"
98
compileSdk 34
109

1110
compileOptions {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ 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">
6+
xmlns:tools="http://schemas.android.com/tools"
7+
package="io.flutter.add2app">
78

89
<application android:allowBackup="false"
910
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:8.1.0'
11+
classpath 'com.android.tools.build:gradle:7.3.0'
1212
}
1313
}
1414

dev/integration_tests/android_custom_host_app/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-8.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

dev/integration_tests/android_driver_test/android/build.gradle

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,19 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// This file is auto generated.
6-
// To update all the build.gradle files in the Flutter repo,
7-
// See dev/tools/bin/generate_gradle_lockfiles.dart.
8-
95
allprojects {
106
repositories {
117
google()
128
mavenCentral()
139
}
1410
}
1511

16-
rootProject.buildDir = '../build'
17-
12+
rootProject.buildDir = "../build"
1813
subprojects {
1914
project.buildDir = "${rootProject.buildDir}/${project.name}"
2015
}
2116
subprojects {
22-
project.evaluationDependsOn(':app')
23-
dependencyLocking {
24-
ignoredDependencies.add('io.flutter:*')
25-
lockFile = file("${rootProject.projectDir}/project-${project.name}.lockfile")
26-
if (!project.hasProperty('local-engine-repo')) {
27-
lockAllConfigurations()
28-
}
29-
}
17+
project.evaluationDependsOn(":app")
3018
}
3119

3220
tasks.register("clean", Delete) {

dev/integration_tests/android_driver_test/android/settings.gradle

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// This file is auto generated.
6-
// To update all the settings.gradle files in the Flutter repo,
7-
// See dev/tools/bin/generate_gradle_lockfiles.dart.
8-
95
pluginManagement {
106
def flutterSdkPath = {
117
def properties = new Properties()
128
file("local.properties").withInputStream { properties.load(it) }
139
def flutterSdkPath = properties.getProperty("flutter.sdk")
1410
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
1511
return flutterSdkPath
16-
}
17-
settings.ext.flutterSdkPath = flutterSdkPath()
12+
}()
1813

19-
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
14+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
2015

2116
repositories {
2217
google()
@@ -25,17 +20,10 @@ pluginManagement {
2520
}
2621
}
2722

28-
buildscript {
29-
dependencyLocking {
30-
lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile")
31-
lockAllConfigurations()
32-
}
33-
}
34-
3523
plugins {
3624
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
3725
id "com.android.application" version "8.1.0" apply false
38-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
26+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
3927
}
4028

4129
include ":app"

dev/integration_tests/android_host_app_v2_embedding/app/build.gradle

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

77
android {
8-
namespace = "io.flutter.add2app"
98
compileSdk 34
109

1110
compileOptions {

dev/integration_tests/android_host_app_v2_embedding/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ 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">
6+
xmlns:tools="http://schemas.android.com/tools"
7+
package="io.flutter.add2app">
78

89
<application android:allowBackup="false"
910
tools:ignore="GoogleAppIndexingWarning,MissingApplicationIcon">

dev/integration_tests/android_host_app_v2_embedding/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:8.1.0'
11+
classpath 'com.android.tools.build:gradle:7.3.0'
1212
}
1313
}
1414

dev/integration_tests/deferred_components_test/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
// See dev/tools/bin/generate_gradle_lockfiles.dart.
88

99
buildscript {
10-
ext.kotlin_version = '1.8.22'
10+
ext.kotlin_version = '1.7.10'
1111
repositories {
1212
google()
1313
mavenCentral()
1414
}
1515

1616
dependencies {
17-
classpath 'com.android.tools.build:gradle:8.1.0'
17+
classpath 'com.android.tools.build:gradle:7.3.0'
1818
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1919
}
2020

dev/integration_tests/deferred_components_test/android/component1/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ apply plugin: "com.android.dynamic-feature"
2424

2525
android {
2626
namespace "io.flutter.integration.deferred_components_test.component1"
27-
compileSdk 35
27+
compileSdk 34
2828

2929
sourceSets {
3030
applicationVariants.all { variant ->
@@ -35,7 +35,7 @@ android {
3535

3636
defaultConfig {
3737
minSdkVersion 21
38-
targetSdkVersion 35
38+
targetSdkVersion 33
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
4141
}

dev/integration_tests/deferred_components_test/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-8.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

dev/integration_tests/external_textures/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-8.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

dev/integration_tests/external_textures/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ buildscript {
3434

3535
plugins {
3636
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
37-
id "com.android.application" version "8.1.0" apply false
38-
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
37+
id "com.android.application" version "7.3.0" apply false
38+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
3939
}
4040

4141
include ":app"

0 commit comments

Comments
 (0)