From 94418c9edbe4182d4e63732c86dd219a5cca58c5 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 29 Aug 2026 11:38:46 -0500 Subject: [PATCH] ci: discover latest Android command-line tools dynamically --- .gitea/workflows/android-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/android-build.yml b/.gitea/workflows/android-build.yml index 15a9c65..aee11ce 100644 --- a/.gitea/workflows/android-build.yml +++ b/.gitea/workflows/android-build.yml @@ -37,7 +37,9 @@ jobs: export ANDROID_HOME="$ANDROID_SDK_ROOT" mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools" if [ ! -x "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" ]; then - curl -fsSL -o /tmp/commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-12266719_latest.zip + tools_url="$(curl -fsSL https://developer.android.com/studio | grep -o 'https://dl.google.com/android/repository/commandlinetools-linux-[0-9][0-9]*_latest.zip' | head -n 1)" + test -n "$tools_url" + curl -fsSL -o /tmp/commandlinetools.zip "$tools_url" rm -rf "$ANDROID_SDK_ROOT/cmdline-tools/latest" "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" unzip -q /tmp/commandlinetools.zip -d "$ANDROID_SDK_ROOT/cmdline-tools" mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest"