-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rely on AGP to auto-install CMake and the NDK.
- Loading branch information
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |