Update Unity Hub to the latest beta which fixes 2022.2.X Android build issues.
Update the build docker file with new paths for the new Android cli tools
Included fix for broken symlinks on new Android tools
Remove the Unity Hub version build argument for Windows as older Hub versions are not maintained by Unity preventing them from being downloaded. Passing an old version is likely to break the build as the install script uses hard-coded hashes that may not match the latest version
Updated grep error text due to internal errors being thrown to the console that are unrelated to installation tasks in Unity Hub
Checklist
[x] Read the contribution guide and accept the code of conduct
[x] Readme (updated or not needed)
Additional Context
Unity has updated the naming of its internal packages for Android. Google has also deprecated the bin/sdkmanager in favor of clitools bin/sdkmanager. Below are the path changes throughout the Unity Versions:
#!/bin/bash
set -e
UNITY_VERSION=("2019.1.0f1" "2019.1.14f1" "2019.2.0f1" "2019.2.21f1" "2019.3.0f1" "2019.3.15f1" "2019.4.0f1" "2019.4.40f1" "2020.1.0f1" "2020.1.17f1" "2020.2.0f1" "2020.2.7f1" "2020.3.0f1" "2020.3.46f1" "2021.1.0f1" "2021.1.28f1" "2021.2.0f1" "2021.2.19f1" "2021.3.0f1" "2021.3.22f1" "2022.1.0f1" "2022.1.24f1" "2022.2.0f1" "2022.2.13f1")
HUB_VERSION="3.4.2-beta.1"
docker build ./images/ubuntu/base -t "unityci/base"
docker build ./images/ubuntu/hub -t "unityci/hub" --build-arg hubVersion=$HUB_VERSION
# Loop through the Unity versions and get the changeset for each one
for version in "${UNITY_VERSION[@]}"; do
UNITY_CHANGESET+=("$(npx unity-changeset $version)")
done
function build_image() {
version=$1
changeSet=$2
docker build --progress=plain ./images/ubuntu/editor -t "unityci/editor:ubuntu-$version-android" \
--build-arg version=$version \
--build-arg changeSet=$changeSet \
--build-arg module=android
}
# Loop through the arrays in parallel
for i in "${!UNITY_VERSION[@]}"; do
version=${UNITY_VERSION[i]}
changeSet=${UNITY_CHANGESET[i]}
build_image $version $changeSet &
done
# Wait for all processes to finish
wait
Changes
Checklist
Additional Context
Unity has updated the naming of its internal packages for Android. Google has also deprecated the bin/sdkmanager in favor of clitools bin/sdkmanager. Below are the path changes throughout the Unity Versions:
Android NDK
Android OpenJDK
Android SDK Platform Tools
Android SDK Command Line Tools
Scripts to Generate the Tables
Build Images (buildall.sh)
Pull Modules.json from each image (pullall.sh)
Generate Markdown (GenerateMD.ps1)