Skip to content

Commit 309cfc5

Browse files
jesswrdsuryaKommana2662
authored andcommitted
Split pre-AGP 8.3 module AAR test into a Java 17 pinned target (flutter#193467)
Add-to-app AAR builds use the Android host app's Gradle/AGP configuration, so Flutter's minimum-version checks don't apply. Host apps on old AGP versions (e.g. 8.2.1) can still consume Flutter AARs, even though those versions are well below Flutter's supported minimum. The pre-AGP 8.3 sub-test uses Gradle 8.4, which can't run on Java 25. This PR moves it to a new Linux `android_java17_build_android_host_app_with_module_aar` target pinned to Java 17. `build_android_host_app_with_module_aar`keeps the modern sub-test (Gradle 9.5.0 / AGP 9.3.1), which will run on the default JDK. That keeps old-AGP host app coverage once CI moves to Java 25. Partially Addresses flutter#193404 ## 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
1 parent eaba48b commit 309cfc5

5 files changed

Lines changed: 500 additions & 447 deletions

File tree

‎.ci.yaml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,33 @@ 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.
1154+
- name: Linux android_java17_build_android_host_app_with_module_aar
1155+
recipe: devicelab/devicelab_drone
1156+
bringup: true
1157+
timeout: 60
1158+
properties:
1159+
dependencies: >-
1160+
[
1161+
{"dependency": "android_sdk", "version": "version:37v2"},
1162+
{"dependency": "open_jdk", "version": "version:17"},
1163+
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
1164+
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
1165+
{"dependency": "ninja", "version": "version:1.9.0"},
1166+
{"dependency": "gradle_dists", "version": "8.4-bin:8.13-rc-1-bin:8.14-bin:9.3.1-bin:9.3.1-all"}
1167+
]
1168+
tags: >
1169+
["devicelab", "hostonly", "linux"]
1170+
task_name: android_java17_build_android_host_app_with_module_aar
1171+
runIf:
1172+
- dev/**
1173+
- packages/flutter_tools/**
1174+
- bin/**
1175+
- .ci.yaml
1176+
- engine/**
1177+
- DEPS
1178+
11521179
- name: Linux build_android_host_app_with_module_source
11531180
recipe: devicelab/devicelab_drone
11541181
timeout: 60

‎TESTOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/dev/devicelab/bin/tasks/android_engine_flags_release_test.dart @camsim99 @flutter/android
1717
/dev/devicelab/bin/tasks/android_intent_security_test.dart @camsim99 @flutter/android
1818
/dev/devicelab/bin/tasks/android_java11_dependency_smoke_tests.dart @jesswrd @flutter/android
19+
/dev/devicelab/bin/tasks/android_java17_build_android_host_app_with_module_aar.dart @jesswrd @flutter/android
1920
/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart @jesswrd @flutter/android
2021
/dev/devicelab/bin/tasks/android_lifecycles_test.dart @reidbaker @flutter/engine
2122
/dev/devicelab/bin/tasks/android_picture_cache_complexity_scoring_perf__timeline_summary.dart @flar @flutter/engine
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/framework.dart';
6+
import 'package:flutter_devicelab/tasks/build_android_host_app_with_module_aar.dart';
7+
import 'package:pub_semver/pub_semver.dart';
8+
9+
/// Runs the module AAR test with older Gradle/AGP versions.
10+
///
11+
/// Gradle 8.4 cannot run on newer JDKs (Java 25 requires Gradle 9.1.0+, see
12+
/// 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.
15+
Future<void> main() async {
16+
await task(
17+
buildAndroidHostAppWithModuleAarTest(gradleVersion: '8.4', agpVersion: Version.parse('8.2.1')),
18+
);
19+
}

0 commit comments

Comments
 (0)