Skip to content

Commit

Permalink
[ci] Split build_all_packages by JDK version. (#7106)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ditman authored Jul 12, 2024
1 parent 33caf1d commit 2677981
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,38 @@ targets:
"CHANNEL": "master"
}
- name: Linux_android android_build_all_packages_legacy master
# When making this `bringup: false`, update the task above to
# use target_file: android_build_all_packages_jdk17.yaml and
# remove its 'dependencies' section.
bringup: true # https://github.com/flutter/packages/pull/7099
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_master.version
# TODO(stuartmorgan): Once stable requires JDK 17, and the
# legacy project is updated accordingly, this entire target
# can be merged back into android_build_all_packages.
# This file only builds a *legacy* version of the project.
target_file: android_build_all_packages_legacy.yaml
channel: master
# The legacy project build requires an older JDK.
dependencies: >-
[
{"dependency": "open_jdk", "version": "version:11"}
]
env_variables: >-
{
"CHANNEL": "master"
}
- name: Linux_android android_build_all_packages stable
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_stable.version
# This builds both legacy, and "modern" projects.
target_file: android_build_all_packages.yaml
channel: stable
# The legacy project build requires an older JDK.
Expand All @@ -394,6 +420,28 @@ targets:
"CHANNEL": "stable"
}
- name: Linux_android android_build_all_packages_legacy stable
# When making this `bringup: false`, update the task above to
# use target_file: android_build_all_packages_jdk17.yaml and
# remove its 'dependencies' section.
bringup: true # https://github.com/flutter/packages/pull/7099
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_stable.version
# This file only builds a *legacy* version of the project.
target_file: android_build_all_packages_legacy.yaml
channel: stable
# The legacy project build requires an older JDK.
dependencies: >-
[
{"dependency": "open_jdk", "version": "version:11"}
]
env_variables: >-
{
"CHANNEL": "stable"
}
- name: Linux_android android_platform_tests_shard_1 master
recipe: packages/packages
timeout: 60
Expand Down
2 changes: 2 additions & 0 deletions .ci/targets/android_build_all_packages.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This builds legacy and modern all_packages app, which requires jdk11
# This will stop working in the next stable!
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
Expand Down
14 changes: 14 additions & 0 deletions .ci/targets/android_build_all_packages_jdk17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This only builds the modern all_packages app, which requires jdk17+
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: build all_packages for Android debug
script: .ci/scripts/build_all_packages_app.sh
args: ["apk", "debug"]
- name: build all_packages for Android release
script: .ci/scripts/build_all_packages_app.sh
args: ["apk", "release"]
17 changes: 17 additions & 0 deletions .ci/targets/android_build_all_packages_legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This only builds the legacy all_packages app, which requires jdk11
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: create all_packages app - legacy version
script: .ci/scripts/create_all_packages_app_legacy.sh
# Output dir; must match the final argument to build_all_packages_app_legacy
# below.
args: ["legacy"]
# Only build legacy in one mode, to minimize extra CI time. Debug is chosen
# somewhat arbitrarily as likely being slightly faster.
- name: build all_packages for Android - legacy version
script: .ci/scripts/build_all_packages_app_legacy.sh
# The final argument here must match the output directory passed to
# create_all_packages_app_legacy above.
args: ["apk", "debug", "legacy"]

0 comments on commit 2677981

Please sign in to comment.