Skip to content

Commit

Permalink
Rely on AGP to auto-install CMake and the NDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanAlbert committed Jan 10, 2024
1 parent 9c55da6 commit 4193f9e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .ci_tools/setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
#!/bin/bash

# Installs Android SDK, NDK, and CMake required to build the samples.
# Detects which Android SDK versions are used by the samples and installs those.
# NDK and CMake are auto-installed by AGP as needed.

if [ -f ~/.android/repositories.cfg ]; then
touch ~/.android/repositories.cfg
fi

for version in $(find . -name build.gradle | xargs grep -h compileSdk | sort | uniq | grep -o '[0-9]\+ *$'); do
echo y | sdkmanager "platforms;android-${version}"
done

for version in $(find . -name build.gradle | xargs grep -h ndkVersion | sort | uniq | cut -d \' -f 2); do
echo y | sdkmanager "ndk;${version}"
done

echo y | sdkmanager "cmake;3.18.1"
echo y | sdkmanager "cmake;3.22.1"

0 comments on commit 4193f9e

Please sign in to comment.