dynamicbible/src/android/install-sdk.sh
Jason Wall db133ed615 upgrade gradle
bootstrap store listing
update graphics
configure publishing apk to google play store
2021-02-28 18:13:30 +00:00

40 lines
1.2 KiB
Bash

#!/usr/bin/env bash
SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip"
ANDROID_HOME="$(pwd)/android-sdk"
ANDROID_VERSION=28
ANDROID_BUILD_TOOLS_VERSION=27.0.3
# Download Android SDK
mkdir "$ANDROID_HOME" .android \
&& cd "$ANDROID_HOME" \
&& curl -o sdk.zip $SDK_URL \
&& unzip sdk.zip \
&& rm sdk.zip \
&& mkdir "$ANDROID_HOME/licenses" || true \
&& echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license" \
&& yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
# Install Android Build Tool and Libraries
$ANDROID_HOME/tools/bin/sdkmanager --update
$ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"platforms;android-${ANDROID_VERSION}" \
"platform-tools"
# to prevent annoying warnings...
touch /root/.android/repositories.cfg
# Install Build Essentials
echo sdk.dir=$ANDROID_HOME > ../local.properties
# Insall the signing keys
cd ..
echo "Creating store key file and signing properties"
base64 -d $play_store_key > ./walljm-play-store-key.jks
cp $play_store_signing_properties ./signing.properties
cp $play_store_credential ./play-store.json
# diagnostics, show me what you've got and where you're at
ls -laF
pwd