forked from eduvpn/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuilder_setup.sh
executable file
·48 lines (38 loc) · 1.35 KB
/
builder_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
###############################################################################
# CONFIGURATION
###############################################################################
SDK_DIR=${HOME}/android-sdk
# current as of 20191028
# see https://developer.android.com/studio/#downloads "Command line tools only"
SDK_VERSION=4333796
# Always use latest from https://developer.android.com/studio/releases/build-tools
BUILD_TOOLS_VERSION=29.0.2
# see app/build.gradle for "targetSdkVersion"
PLATFORM_VERSION=29
# should not require modification...
SDK_URL=https://dl.google.com/android/repository/sdk-tools-linux-${SDK_VERSION}.zip
###############################################################################
# SETUP
###############################################################################
# create and populate SDK directory
(
mkdir -p "${SDK_DIR}"
cd "${SDK_DIR}" || exit
curl -L -O ${SDK_URL}
unzip -q sdk-tools-linux-${SDK_VERSION}.zip
rm sdk-tools-linux-${SDK_VERSION}.zip
)
# accept licenses
(
cd "${SDK_DIR}" || exit
yes | tools/bin/sdkmanager --licenses
)
# install required SDK components
(
cd "${SDK_DIR}" || exit
tools/bin/sdkmanager --update
tools/bin/sdkmanager ndk-bundle
tools/bin/sdkmanager "build-tools;${BUILD_TOOLS_VERSION}"
tools/bin/sdkmanager "platforms;android-${PLATFORM_VERSION}"
)