2021-08-24 10:18:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-05-07 14:34:49 +00:00
|
|
|
# $HOME must be used instead of ~ else cargo-ndk cannot find the folder
|
|
|
|
export ANDROID_HOME=$HOME/Android/Sdk
|
|
|
|
MAKEFLAGS=-j$(nproc)
|
|
|
|
export MAKEFLAGS
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
ANDROID_NDK_VERSION="$(cd "$ANDROID_HOME/ndk" && find . -maxdepth 1 | sort -n | tail -1)"
|
|
|
|
ANDROID_NDK_VERSION="${ANDROID_NDK_VERSION:2}"
|
2024-05-07 14:34:49 +00:00
|
|
|
# ANDROID_NDK_VERSION must be exported for build.sh step
|
2021-08-24 10:18:20 +00:00
|
|
|
export ANDROID_NDK_VERSION
|
2024-05-07 14:34:49 +00:00
|
|
|
# ANDROID_NDK_HOME must be exported for cargo-ndk
|
|
|
|
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$ANDROID_NDK_VERSION"
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_API_LEVEL=34
|
|
|
|
ANDROID_SUB_BUILD_DIR=build_arch
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
COLOR_RED="\e[1;31m"
|
|
|
|
COLOR_YELLOW="\e[1;33m"
|
|
|
|
COLOR_CYAN="\e[1;36m"
|
|
|
|
COLOR_RESET="\e[0m"
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=0
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
if [ -z ${1+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=1
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Did not pass Android build type"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_BUILD=$1
|
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Android build type: ${ANDROID_BUILD}"
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${2+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=1
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Did not pass game name"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
GAME_NAME=$2
|
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Game name: ${GAME_NAME}"
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${3+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=1
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Did not pass package name"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
PACKAGE_NAME=$3
|
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Package name: ${PACKAGE_NAME}"
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-07 11:13:34 +00:00
|
|
|
if [ -z ${4+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=1
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Did not pass build type"
|
2024-05-09 09:52:37 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
BUILD_TYPE=$4
|
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Build type: ${BUILD_TYPE}"
|
2024-05-09 09:52:37 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${5+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
SHOW_USAGE_INFO=1
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Did not pass build folder"
|
2024-05-07 11:13:34 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
BUILD_FOLDER=$5
|
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Build folder: ${BUILD_FOLDER}"
|
2024-05-07 11:13:34 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [ $SHOW_USAGE_INFO == 1 ]; then
|
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Usage: ./cmake_android.sh <x86/x86_64/arm/arm64/all> <Game name> <Package name> <Debug/Release> <Build folder>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# These are the properties of the default Android debug key. The debug key will
|
|
|
|
# automatically be created during the Gradle build if it does not exist already,
|
|
|
|
# so you don't need to create it yourself.
|
|
|
|
DEFAULT_KEY_NAME=~/.android/debug.keystore
|
|
|
|
DEFAULT_KEY_PW=android
|
|
|
|
DEFAULT_KEY_ALIAS=androiddebugkey
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
if [ -z ${TW_KEY_NAME+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Did not pass a key path for the APK signer, using default: ${DEFAULT_KEY_NAME}"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
DEFAULT_KEY_NAME=$TW_KEY_NAME
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
if [ -z ${TW_KEY_PW+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Did not pass a key password for the APK signer, using default: ${DEFAULT_KEY_PW}"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
DEFAULT_KEY_PW=$TW_KEY_PW
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
if [ -z ${TW_KEY_ALIAS+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Did not pass a key alias for the APK signer, using default: ${DEFAULT_KEY_ALIAS}"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
DEFAULT_KEY_ALIAS=$TW_KEY_ALIAS
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
export TW_KEY_NAME="${DEFAULT_KEY_NAME}"
|
|
|
|
export TW_KEY_PW=$DEFAULT_KEY_PW
|
|
|
|
export TW_KEY_ALIAS=$DEFAULT_KEY_ALIAS
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_CODE=1
|
2021-08-24 10:18:20 +00:00
|
|
|
if [ -z ${TW_VERSION_CODE+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_CODE=$(grep '#define DDNET_VERSION_NUMBER' src/game/version.h | awk '{print $3}')
|
|
|
|
if [ -z ${ANDROID_VERSION_CODE+x} ]; then
|
|
|
|
ANDROID_VERSION_CODE=1
|
2024-05-09 10:19:47 +00:00
|
|
|
fi
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Did not pass a version code, using default: ${ANDROID_VERSION_CODE}"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_CODE=$TW_VERSION_CODE
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
export TW_VERSION_CODE=$ANDROID_VERSION_CODE
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_NAME="1.0"
|
2021-08-24 10:18:20 +00:00
|
|
|
if [ -z ${TW_VERSION_NAME+x} ]; then
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_NAME="$(grep '#define GAME_RELEASE_VERSION' src/game/version.h | awk '{print $3}' | tr -d '"')"
|
|
|
|
if [ -z ${ANDROID_VERSION_NAME+x} ]; then
|
|
|
|
ANDROID_VERSION_NAME="1.0"
|
2024-05-09 10:19:47 +00:00
|
|
|
fi
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_YELLOW}%s${COLOR_RESET}\n" "Did not pass a version name, using default: ${ANDROID_VERSION_NAME}"
|
2021-08-24 10:18:20 +00:00
|
|
|
else
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_VERSION_NAME=$TW_VERSION_NAME
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
export TW_VERSION_NAME=$ANDROID_VERSION_NAME
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Building cmake..."
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
function build_for_type() {
|
|
|
|
cmake \
|
|
|
|
-H. \
|
|
|
|
-G "Ninja" \
|
|
|
|
-DPREFER_BUNDLED_LIBS=ON \
|
2024-05-17 20:22:08 +00:00
|
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
|
|
-DANDROID_PLATFORM="android-${ANDROID_API_LEVEL}" \
|
2024-05-07 14:34:49 +00:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" \
|
|
|
|
-DANDROID_NDK="$ANDROID_NDK_HOME" \
|
2021-08-24 10:18:20 +00:00
|
|
|
-DANDROID_ABI="${2}" \
|
|
|
|
-DANDROID_ARM_NEON=TRUE \
|
2024-05-07 14:34:49 +00:00
|
|
|
-DCMAKE_ANDROID_NDK="$ANDROID_NDK_HOME" \
|
|
|
|
-DCMAKE_SYSTEM_NAME=Android \
|
2024-05-17 20:22:08 +00:00
|
|
|
-DCMAKE_SYSTEM_VERSION="$ANDROID_API_LEVEL" \
|
2024-05-07 14:34:49 +00:00
|
|
|
-DCMAKE_ANDROID_ARCH_ABI="${2}" \
|
|
|
|
-DCARGO_NDK_TARGET="${3}" \
|
2024-05-17 20:22:08 +00:00
|
|
|
-DCARGO_NDK_API="$ANDROID_API_LEVEL" \
|
|
|
|
-B"${BUILD_FOLDER}/$ANDROID_SUB_BUILD_DIR/$1" \
|
2021-08-24 10:18:20 +00:00
|
|
|
-DSERVER=OFF \
|
|
|
|
-DTOOLS=OFF \
|
|
|
|
-DDEV=TRUE \
|
|
|
|
-DCMAKE_CROSSCOMPILING=ON \
|
2022-06-25 08:12:56 +00:00
|
|
|
-DVULKAN=ON \
|
|
|
|
-DVIDEORECORDER=OFF
|
2021-08-24 10:18:20 +00:00
|
|
|
(
|
2024-05-17 20:22:08 +00:00
|
|
|
cd "${BUILD_FOLDER}/$ANDROID_SUB_BUILD_DIR/$1" || exit 1
|
2024-05-07 11:22:59 +00:00
|
|
|
cmake --build . --target game-client
|
2021-08-24 10:18:20 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
mkdir -p "${BUILD_FOLDER}"
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "arm" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 14:34:49 +00:00
|
|
|
build_for_type arm armeabi-v7a armv7-linux-androideabi &
|
2024-05-17 18:09:24 +00:00
|
|
|
PID_BUILD_ARM=$!
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "arm64" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 14:34:49 +00:00
|
|
|
build_for_type arm64 arm64-v8a aarch64-linux-android &
|
2024-05-17 18:09:24 +00:00
|
|
|
PID_BUILD_ARM64=$!
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "x86" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 14:34:49 +00:00
|
|
|
build_for_type x86 x86 i686-linux-android &
|
2024-05-17 18:09:24 +00:00
|
|
|
PID_BUILD_X86=$!
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "x86_64" || "${ANDROID_BUILD}" == "x64" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 14:34:49 +00:00
|
|
|
build_for_type x86_64 x86_64 x86_64-linux-android &
|
2024-05-17 18:09:24 +00:00
|
|
|
PID_BUILD_X86_64=$!
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 18:09:24 +00:00
|
|
|
if [ -n "$PID_BUILD_ARM" ] && ! wait "$PID_BUILD_ARM"; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Building for arm failed"
|
2024-05-17 18:09:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -n "$PID_BUILD_ARM64" ] && ! wait "$PID_BUILD_ARM64"; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Building for arm64 failed"
|
2024-05-17 18:09:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -n "$PID_BUILD_X86" ] && ! wait "$PID_BUILD_X86"; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Building for x86 failed"
|
2024-05-17 18:09:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -n "$PID_BUILD_X86_64" ] && ! wait "$PID_BUILD_X86_64"; then
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_RED}%s${COLOR_RESET}\n" "Building for x86_64 failed"
|
2024-05-17 18:09:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Copying project files..."
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
cd "${BUILD_FOLDER}" || exit 1
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
mkdir -p src/main
|
2024-05-17 18:00:54 +00:00
|
|
|
mkdir -p src/main/res/values
|
2024-08-26 21:46:20 +00:00
|
|
|
mkdir -p src/main/res/xml
|
2021-08-24 10:18:20 +00:00
|
|
|
mkdir -p src/main/res/mipmap
|
|
|
|
|
|
|
|
function copy_dummy_files() {
|
2024-05-17 20:22:08 +00:00
|
|
|
rm -f ./"$2"
|
2021-08-24 10:18:20 +00:00
|
|
|
cp ../"$1" "$2"
|
|
|
|
}
|
|
|
|
|
|
|
|
copy_dummy_files scripts/android/files/build.sh build.sh
|
|
|
|
copy_dummy_files scripts/android/files/gradle-wrapper.jar gradle-wrapper.jar
|
|
|
|
copy_dummy_files scripts/android/files/build.gradle build.gradle
|
|
|
|
copy_dummy_files scripts/android/files/gradle-wrapper.properties gradle-wrapper.properties
|
|
|
|
copy_dummy_files scripts/android/files/gradle.properties gradle.properties
|
|
|
|
copy_dummy_files scripts/android/files/proguard-rules.pro proguard-rules.pro
|
|
|
|
copy_dummy_files scripts/android/files/settings.gradle settings.gradle
|
|
|
|
copy_dummy_files scripts/android/files/AndroidManifest.xml src/main/AndroidManifest.xml
|
2024-05-17 18:00:54 +00:00
|
|
|
copy_dummy_files scripts/android/files/res/values/strings.xml src/main/res/values/strings.xml
|
2024-08-26 21:46:20 +00:00
|
|
|
copy_dummy_files scripts/android/files/res/xml/shortcuts.xml src/main/res/xml/shortcuts.xml
|
2022-01-20 09:49:31 +00:00
|
|
|
copy_dummy_files other/icons/DDNet_256x256x32.png src/main/res/mipmap/ic_launcher.png
|
|
|
|
copy_dummy_files other/icons/DDNet_256x256x32.png src/main/res/mipmap/ic_launcher_round.png
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Copying libraries..."
|
|
|
|
|
2021-08-24 10:18:20 +00:00
|
|
|
function copy_libs() {
|
|
|
|
mkdir -p "lib/$2"
|
2024-05-17 20:22:08 +00:00
|
|
|
cp "$ANDROID_SUB_BUILD_DIR/$1/libDDNet.so" "lib/$2" || exit 1
|
2021-08-24 10:18:20 +00:00
|
|
|
}
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "arm" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 12:09:20 +00:00
|
|
|
copy_libs arm armeabi-v7a
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "arm64" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 12:09:20 +00:00
|
|
|
copy_libs arm64 arm64-v8a
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "x86" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 12:09:20 +00:00
|
|
|
copy_libs x86 x86
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
if [[ "${ANDROID_BUILD}" == "x86_64" || "${ANDROID_BUILD}" == "x64" || "${ANDROID_BUILD}" == "all" ]]; then
|
2024-05-07 12:09:20 +00:00
|
|
|
copy_libs x86_64 x86_64
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
ANDROID_BUILD_DUMMY=$ANDROID_BUILD
|
|
|
|
if [[ "${ANDROID_BUILD}" == "all" ]]; then
|
|
|
|
ANDROID_BUILD_DUMMY=arm
|
2021-08-24 10:18:20 +00:00
|
|
|
fi
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Copying data folder..."
|
2021-08-24 10:18:20 +00:00
|
|
|
mkdir -p assets/asset_integrity_files
|
2024-05-17 20:22:08 +00:00
|
|
|
cp -R "$ANDROID_SUB_BUILD_DIR/$ANDROID_BUILD_DUMMY/data" ./assets/asset_integrity_files
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Downloading certificate..."
|
|
|
|
curl -s -S --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem
|
|
|
|
cp ./cacert.pem ./assets/asset_integrity_files/data/cacert.pem || exit 1
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Creating integrity index file..."
|
2021-08-24 10:18:20 +00:00
|
|
|
(
|
|
|
|
cd assets/asset_integrity_files || exit 1
|
|
|
|
|
|
|
|
tmpfile="$(mktemp /tmp/hash_strings.XXX)"
|
|
|
|
|
|
|
|
find data -iname "*" -type f -print0 | while IFS= read -r -d $'\0' file; do
|
|
|
|
sha_hash=$(sha256sum "$file" | cut -d' ' -f 1)
|
|
|
|
echo "$file $sha_hash" >> "$tmpfile"
|
|
|
|
done
|
|
|
|
|
|
|
|
full_hash="$(sha256sum "$tmpfile" | cut -d' ' -f 1)"
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
rm -f "integrity.txt"
|
2021-08-24 10:18:20 +00:00
|
|
|
{
|
|
|
|
echo "$full_hash"
|
|
|
|
cat "$tmpfile"
|
|
|
|
} > "integrity.txt"
|
|
|
|
)
|
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
printf "${COLOR_CYAN}%s${COLOR_RESET}\n" "Preparing gradle build..."
|
2021-08-24 10:18:20 +00:00
|
|
|
|
2024-05-17 20:22:08 +00:00
|
|
|
rm -R -f src/main/java/org
|
2024-05-09 09:52:37 +00:00
|
|
|
mkdir -p src/main/java
|
2021-08-24 10:18:20 +00:00
|
|
|
cp -R ../scripts/android/files/java/org src/main/java/
|
|
|
|
cp -R ../ddnet-libs/sdl/java/org src/main/java/
|
|
|
|
|
|
|
|
# shellcheck disable=SC1091
|
2024-05-17 20:22:08 +00:00
|
|
|
source ./build.sh "$GAME_NAME" "$PACKAGE_NAME" "$BUILD_TYPE"
|
2021-08-24 10:18:20 +00:00
|
|
|
|
|
|
|
cd ..
|