Skip to content

Commit cab012c

Browse files
jesswrdmboetger
andauthored
Updated Most flutter/flutter Defaults to 37 (flutter#193307)
In this step, we generally update the compileSdk version to 37, the ndkVersion to a compatible version, and any test targets to API 37. We did not bump ndkVersion because the current version is already compatible here. There was also only one outstanding test target that needed to be bumped to API 37. Partially Addresses flutter#189518 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Matt Boetger <[email protected]>
1 parent 781b76a commit cab012c

11 files changed

Lines changed: 58 additions & 30 deletions

File tree

‎.ci.yaml‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,8 @@ targets:
11491149
- engine/**
11501150
- DEPS
11511151

1152-
# Gradle 8.4 cannot run on Java 25, so the pre-AGP 8.3 module test is pinned
1153-
# to Java 17 instead of the default JDK.
1152+
# Gradle 8.x cannot run on Java 25, so the oldest-supported-AGP module test is
1153+
# pinned to Java 17 instead of the default JDK.
11541154
- name: Linux android_java17_build_android_host_app_with_module_aar
11551155
recipe: devicelab/devicelab_drone
11561156
timeout: 60
@@ -1679,13 +1679,15 @@ targets:
16791679
timeout: 60
16801680
properties:
16811681
add_recipes_cq: "true"
1682-
# This makes use of Baklava, a preview version of android. Preview versions eventually
1682+
# This makes use of CinnamonBun, a preview version of android. Preview versions eventually
16831683
# get removed from the sdk manager, so it is hosted on CIPD to ensure integration testing
1684-
# doesn't flake when that happens.
1685-
# https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:baklava_v1
1684+
# doesn't flake when that happens. The preview must be at least FlutterExtension.compileSdkVersion.
1685+
# Keep in sync with `previewCodename` in
1686+
# packages/flutter_tools/test/android_preview_integration.shard/flutter_build_preview_sdk_test.dart.
1687+
# https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:cinnamonbun
16861688
dependencies: >-
16871689
[
1688-
{"dependency": "android_sdk", "version": "version:baklava_v1"},
1690+
{"dependency": "android_sdk", "version": "version:cinnamonbun"},
16891691
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
16901692
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
16911693
{"dependency": "goldctl", "version": "git_revision:c845c41b9b81bfcb11f2f0ab17b5b2386d634c31"},
@@ -7232,7 +7234,7 @@ targets:
72327234
add_recipes_cq: "true"
72337235
dependencies: >-
72347236
[
7235-
{"dependency": "android_sdk", "version": "version:36v4"},
7237+
{"dependency": "android_sdk", "version": "version:37v2"},
72367238
{"dependency": "open_jdk", "version": "version:25.0.2"},
72377239
{"dependency": "vs_build", "version": "version:vs2019"},
72387240
{"dependency": "gradle_dists", "version": "8.4-bin:8.13-rc-1-bin:8.14-bin:9.3.1-bin:9.3.1-all"}

‎dev/benchmarks/multiple_flutters/android/app/build.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
}
1414

1515
namespace = "dev.flutter.multipleflutters"
16-
compileSdk = 36
16+
compileSdk = 37
1717
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
1818

1919

‎dev/devicelab/bin/tasks/android_java17_build_android_host_app_with_module_aar.dart‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ import 'package:pub_semver/pub_semver.dart';
88

99
/// Runs the module AAR test with older Gradle/AGP versions.
1010
///
11-
/// Gradle 8.4 cannot run on newer JDKs (Java 25 requires Gradle 9.1.0+, see
11+
/// Uses the oldest AGP and Gradle that Flutter supports. Keep in sync with
12+
/// errorAGPVersion and errorGradleVersion in
13+
/// packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt.
14+
/// Older AGP versions (e.g. 8.2.1) can't compile against API 37, which Flutter
15+
/// AARs require of their consumers.
16+
///
17+
/// Gradle 8.x cannot run on newer JDKs (Java 25 requires Gradle 9.1.0+, see
1218
/// https://docs.gradle.org/current/userguide/compatibility.html), so this task
13-
/// runs on a CI target pinned to Java 17 to keep coverage of pre-AGP 8.3
14-
/// projects.
19+
/// runs on a CI target pinned to Java 17.
1520
Future<void> main() async {
1621
await task(
17-
buildAndroidHostAppWithModuleAarTest(gradleVersion: '8.4', agpVersion: Version.parse('8.2.1')),
22+
buildAndroidHostAppWithModuleAarTest(
23+
gradleVersion: '8.14',
24+
agpVersion: Version.parse('8.11.1'),
25+
),
1826
);
1927
}

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

Lines changed: 1 addition & 1 deletion
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 = 36
27+
compileSdk = 37
2828
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
2929

3030
sourceSets {

‎dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle‎

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

77
android {
88
namespace = "io.flutter.addtoapp"
9-
compileSdk = 36
9+
compileSdk = 37
1010
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
1111

1212
compileOptions {

‎dev/integration_tests/pure_android_host_apps/android_custom_host_app/SampleApp/build.gradle‎

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

77
android {
88
namespace = "io.flutter.add2app"
9-
compileSdk = 36
9+
compileSdk = 37
1010
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
1111

1212

‎dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle‎

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

77
android {
88
namespace = "io.flutter.add2app"
9-
compileSdk = 36
9+
compileSdk = 37
1010
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
1111

1212
compileOptions {

‎dev/integration_tests/pure_android_host_apps/host_app_kotlin_gradle_dsl/app/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55

66
android {
77
namespace = "com.example.myapplication"
8-
compileSdk = 36
8+
compileSdk = 37
99
ndkVersion = "28.2.13676358" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
1010

1111
defaultConfig {

‎packages/flutter_tools/gradle/src/main/kotlin/FlutterExtension.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.gradle.api.GradleException
2020
@Suppress("unused") // The values in this class are used in Flutter developers app-level build.gradle file.
2121
open class FlutterExtension {
2222
/** Sets the compileSdkVersion used by default in Flutter app projects. */
23-
val compileSdkVersion: Int = 36
23+
val compileSdkVersion: Int = 37
2424

2525
/** Sets the minSdkVersion used by default in Flutter app projects. */
2626
val minSdkVersion: Int = 24

‎packages/flutter_tools/lib/src/android/gradle_utils.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const templateKotlinGradlePluginVersion = '2.4.20';
5353
// so new versions are picked up after a Flutter upgrade.
5454
//
5555
// Please see the README before changing any of these values.
56-
const compileSdkVersionInt = 36;
56+
const compileSdkVersionInt = 37;
5757
const compileSdkVersion = '$compileSdkVersionInt';
5858
const minSdkVersionInt = 24;
5959
const minSdkVersion = '$minSdkVersionInt';

0 commit comments

Comments
 (0)