maint(common): consolidate builder scripts 🐸#14449
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
4495a4a to
f394245
Compare
|
|
||
| # For CI compatibility of building Keyman for Android 18.0 with OpenJDK 11, | ||
| # this overrides JAVA_HOME for the builder script to use OpenJDK 21. | ||
| android_set_java_home() { | ||
| if [[ ! -z ${JAVA_HOME_21+x} ]]; then | ||
| builder_echo "Setting JAVA_HOME to JAVA_HOME_21 (${JAVA_HOME_21})" | ||
| export JAVA_HOME="${JAVA_HOME_21}" | ||
| fi | ||
| } | ||
|
|
||
| # Override JAVA_HOME | ||
| android_set_java_home |
There was a problem hiding this comment.
I wonder if we should move this to the TC script wrappers?
There was a problem hiding this comment.
I think I prefer a general location since it's used in local dev builds
| # For CI compatibility of building Keyman for Android 18.0 with OpenJDK 11, | ||
| # this overrides JAVA_HOME for the builder script to use OpenJDK 21. | ||
| set_java_home() { | ||
| set_java_home_21 | ||
| } | ||
|
|
||
| set_java_home_21() { | ||
| if [[ ! -z ${JAVA_HOME_21+x} ]]; then | ||
| builder_echo "Setting JAVA_HOME to JAVA_HOME_21 (${JAVA_HOME_21})" | ||
| export JAVA_HOME="${JAVA_HOME_21}" | ||
| fi | ||
| } | ||
|
|
||
| set_java_home_11() { | ||
| if [[ ! -z ${JAVA_HOME_11+x} ]]; then | ||
| builder_echo "Setting JAVA_HOME to JAVA_HOME_11 (${JAVA_HOME_11})" | ||
| export JAVA_HOME="${JAVA_HOME_11}" | ||
| fi | ||
| } | ||
|
|
There was a problem hiding this comment.
Moved to android/build.sh
The file build-utils.sh can be deleted in a follow-up PR once #14449 hits master.
The file build-utils.sh can be deleted in a follow-up PR once #14449 hits master.
eb9ce59 to
0bcce97
Compare
| @@ -1,4 +1,4 @@ | |||
| # Using the build-utils.sh builder functions | |||
| # Using the builder-basic.inc.sh builder functions | |||
There was a problem hiding this comment.
Most build scripts should use builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh. Documented in resources/build/README.md.
Should this doc also have a brief clarification?
There was a problem hiding this comment.
Can do in a follow-up PR
Relates-to: #14449 (comment) Build-bot: skip Test-bot: skip
|
Changes in this pull request will be available for download in Keyman version 19.0.95-alpha |
|
Changes in this pull request will be available for download in Keyman version 19.0.95-alpha |
|
Do we have a v20 maintenance issue for removing the temporary copy of build-utils.sh? |
We do now, see #14549. |
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by giving the scripts more appropriate names. Most build scripts should use builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh. Documented in resources/build/README.md.
Renames:
Other changes:
More functions may be moved from builder-basic.inc.sh into utils.inc.sh or other scripts in the future.
Note: deb-packaging.yml currently depends on build-utils.sh, and is sourced from
masterbranch -- while its imports come from the current branch for the build. So a temporary copy of build-utils.sh is retained in order for this branch's builds (and child branches) to pass, but should be removed in a follow-up PR once this branch lands.Fixes: #14065
Build-bot: build all
Test-bot: skip