Skip to content

Commit 2677981

Browse files
authored
[ci] Split build_all_packages by JDK version. (#7106)
This PR introduces a new `android_build_all_packages_legacy` in `master` and `stable` to build only the "legacy" version of an Android project using JDK11. This PR is required to resume rolling the flutter framework, like here: * #7099
1 parent 33caf1d commit 2677981

File tree

4 files changed

+81
-0
lines changed

4 files changed

+81
-0
lines changed

.ci.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,38 @@ targets:
376376
"CHANNEL": "master"
377377
}
378378
379+
- name: Linux_android android_build_all_packages_legacy master
380+
# When making this `bringup: false`, update the task above to
381+
# use target_file: android_build_all_packages_jdk17.yaml and
382+
# remove its 'dependencies' section.
383+
bringup: true # https://github.com/flutter/packages/pull/7099
384+
recipe: packages/packages
385+
timeout: 30
386+
properties:
387+
version_file: flutter_master.version
388+
# TODO(stuartmorgan): Once stable requires JDK 17, and the
389+
# legacy project is updated accordingly, this entire target
390+
# can be merged back into android_build_all_packages.
391+
# This file only builds a *legacy* version of the project.
392+
target_file: android_build_all_packages_legacy.yaml
393+
channel: master
394+
# The legacy project build requires an older JDK.
395+
dependencies: >-
396+
[
397+
{"dependency": "open_jdk", "version": "version:11"}
398+
]
399+
env_variables: >-
400+
{
401+
"CHANNEL": "master"
402+
}
403+
379404
- name: Linux_android android_build_all_packages stable
380405
recipe: packages/packages
381406
timeout: 30
382407
properties:
383408
add_recipes_cq: "true"
384409
version_file: flutter_stable.version
410+
# This builds both legacy, and "modern" projects.
385411
target_file: android_build_all_packages.yaml
386412
channel: stable
387413
# The legacy project build requires an older JDK.
@@ -394,6 +420,28 @@ targets:
394420
"CHANNEL": "stable"
395421
}
396422
423+
- name: Linux_android android_build_all_packages_legacy stable
424+
# When making this `bringup: false`, update the task above to
425+
# use target_file: android_build_all_packages_jdk17.yaml and
426+
# remove its 'dependencies' section.
427+
bringup: true # https://github.com/flutter/packages/pull/7099
428+
recipe: packages/packages
429+
timeout: 30
430+
properties:
431+
version_file: flutter_stable.version
432+
# This file only builds a *legacy* version of the project.
433+
target_file: android_build_all_packages_legacy.yaml
434+
channel: stable
435+
# The legacy project build requires an older JDK.
436+
dependencies: >-
437+
[
438+
{"dependency": "open_jdk", "version": "version:11"}
439+
]
440+
env_variables: >-
441+
{
442+
"CHANNEL": "stable"
443+
}
444+
397445
- name: Linux_android android_platform_tests_shard_1 master
398446
recipe: packages/packages
399447
timeout: 60

.ci/targets/android_build_all_packages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This builds legacy and modern all_packages app, which requires jdk11
2+
# This will stop working in the next stable!
13
tasks:
24
- name: prepare tool
35
script: .ci/scripts/prepare_tool.sh
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This only builds the modern all_packages app, which requires jdk17+
2+
tasks:
3+
- name: prepare tool
4+
script: .ci/scripts/prepare_tool.sh
5+
infra_step: true # Note infra steps failing prevents "always" from running.
6+
- name: create all_packages app
7+
script: .ci/scripts/create_all_packages_app.sh
8+
infra_step: true # Note infra steps failing prevents "always" from running.
9+
- name: build all_packages for Android debug
10+
script: .ci/scripts/build_all_packages_app.sh
11+
args: ["apk", "debug"]
12+
- name: build all_packages for Android release
13+
script: .ci/scripts/build_all_packages_app.sh
14+
args: ["apk", "release"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This only builds the legacy all_packages app, which requires jdk11
2+
tasks:
3+
- name: prepare tool
4+
script: .ci/scripts/prepare_tool.sh
5+
infra_step: true # Note infra steps failing prevents "always" from running.
6+
- name: create all_packages app - legacy version
7+
script: .ci/scripts/create_all_packages_app_legacy.sh
8+
# Output dir; must match the final argument to build_all_packages_app_legacy
9+
# below.
10+
args: ["legacy"]
11+
# Only build legacy in one mode, to minimize extra CI time. Debug is chosen
12+
# somewhat arbitrarily as likely being slightly faster.
13+
- name: build all_packages for Android - legacy version
14+
script: .ci/scripts/build_all_packages_app_legacy.sh
15+
# The final argument here must match the output directory passed to
16+
# create_all_packages_app_legacy above.
17+
args: ["apk", "debug", "legacy"]

0 commit comments

Comments
 (0)