Skip to content

Commit

Permalink
Merge pull request #1027 from shankari/upgrade_android_sdk_cli
Browse files Browse the repository at this point in the history
⬆️  Upgrade the android SDK tools to the latest versions
  • Loading branch information
shankari authored Sep 9, 2023
2 parents dbe3c39 + f7f41e6 commit 24a3f71
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/android-automated-sdk-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
- name: Install to a new SDK root
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
printf "Y\nY\nY\nY\nY\n" | bash setup/prereq_android_sdk_install.sh
- name: Verify that all packages are as expected
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
echo "Comparing $ANDROID_SDK_ROOT and $NEW_ANDROID_SDK_ROOT"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/existing_packages
$NEW_ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed > /tmp/new_packages
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Verify that directory structure is consistent
shell: bash -l -x {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
ls -al $ANDROID_SDK_ROOT
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Ensure that the path is correct and installed programs are runnable
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
echo "About to run the emulator at $ANDROID_SDK_ROOT/emulator/emulator"
Expand All @@ -84,14 +84,14 @@ jobs:
- name: Setup the cordova environment
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
bash setup/setup_android_native.sh
- name: Ensure that the path is correct and the project can be activated
shell: bash -l {0}
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export ANDROID_SDK_ROOT=$NEW_ANDROID_SDK_ROOT
echo "New SDK root $ANDROID_SDK_ROOT"
source setup/activate_native.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Pre-requisites
- or this [supposedly easier to use repo](https://github.com/xcpretty/xcode-install)
- **NOTE**: the basic xcode install on Catalina was messed up for me due to a prior installation of command line tools. [These workarounds helped](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md).
- git
- Java 11. Tested with [OpenJDK 11 (Temurin) using AdoptOpenJDK](https://adoptopenjdk.net/releases.html).
- Java 17. Tested with [OpenJDK 17 (Temurin) using Adoptium](https://adoptium.net).
- android SDK; install manually or use setup script below. Note that you only need to run this once **per computer**.
```
$ bash setup/prereq_android_sdk_install.sh
Expand Down
5 changes: 4 additions & 1 deletion setup/android_sdk_packages
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
build-tools;31.0.0
build-tools;32.0.0
build-tools;33.0.2
build-tools;34.0.0
emulator
extras;google;google_play_services
extras;intel;Hardware_Accelerated_Execution_Manager
patcher;v4
platform-tools
platforms;android-30
platforms;android-31
platforms;android-32
platforms;android-33
platforms;android-34
system-images;android-22;google_apis;x86_64
system-images;android-23;google_apis;x86_64
system-images;android-24;google_apis_playstore;x86
Expand All @@ -24,3 +25,5 @@ system-images;android-32;google_apis;x86_64
system-images;android-32;google_apis_playstore;x86_64
system-images;android-33;google_apis;x86_64
system-images;android-33;google_apis_playstore;x86_64
system-images;android-34;google_apis;x86_64
system-images;android-34;google_apis_playstore;x86_64
2 changes: 1 addition & 1 deletion setup/prereq_android_sdk_install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TOOLS_VERSION=9477386
TOOLS_VERSION=10406996
TOOLS_ZIP_FILENAME=commandlinetools-mac-${TOOLS_VERSION}_latest.zip

echo "Installing command line tools from $TOOLS_ZIP_FILENAME"
Expand Down

0 comments on commit 24a3f71

Please sign in to comment.