From 69102880c941923cdf69fe9fe4b09147601a055d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sat, 11 May 2024 18:26:39 +0200 Subject: [PATCH] Remove unused `GE_NO_APK_BUILD` variable This variable is always empty and we don't need to support not building the APK file. --- scripts/android/files/build.sh | 53 ++++++++++++++++------------------ 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/scripts/android/files/build.sh b/scripts/android/files/build.sh index a82a9d815..1a9ac993a 100644 --- a/scripts/android/files/build.sh +++ b/scripts/android/files/build.sh @@ -54,33 +54,30 @@ if [[ "${_APK_BUILD_TYPE}" == "Debug" ]]; then sed -i "s/android.enableR8.fullMode=true/android.enableR8.fullMode=false/g" gradle.properties fi -if [[ -z ${GE_NO_APK_BUILD} || "${GE_NO_APK_BUILD}" != "1" ]]; then +_RELEASE_TYPE_NAME=debug +_RELEASE_TYPE_APK_NAME= +if [[ "${_APK_BUILD_TYPE}" == "Debug" ]]; then _RELEASE_TYPE_NAME=debug - _RELEASE_TYPE_APK_NAME= - if [[ "${_APK_BUILD_TYPE}" == "Debug" ]]; then - _RELEASE_TYPE_NAME=debug - fi - - if [[ "${_APK_BUILD_TYPE}" == "Release" ]]; then - _RELEASE_TYPE_NAME=release - _RELEASE_TYPE_APK_NAME= - fi - - APP_BASE_NAME=Gradle - CLASSPATH=gradle-wrapper.jar - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all - if [[ "${_APK_BUILD_TYPE}" == "Debug" ]]; then - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all builddebug - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all assembleDebug - else - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all buildrelease - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all assembleRelease - fi - cp build/outputs/apk/"$_RELEASE_TYPE_NAME"/"$_APK_BASENAME"-"$_RELEASE_TYPE_NAME""$_RELEASE_TYPE_APK_NAME".apk "$_APK_BASENAME".apk - - if [[ "${_APK_BUILD_TYPE}" == "Release" ]]; then - java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all bundleRelease - - cp build/outputs/bundle/"$_RELEASE_TYPE_NAME"/"$_APK_BASENAME"-"$_RELEASE_TYPE_NAME""$_RELEASE_TYPE_APK_NAME".aab "$_APK_BASENAME".aab - fi +fi + +if [[ "${_APK_BUILD_TYPE}" == "Release" ]]; then + _RELEASE_TYPE_NAME=release + _RELEASE_TYPE_APK_NAME= +fi + +APP_BASE_NAME=Gradle +CLASSPATH=gradle-wrapper.jar +java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all +if [[ "${_APK_BUILD_TYPE}" == "Debug" ]]; then + java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all builddebug + java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all assembleDebug +else + java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all buildrelease + java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all assembleRelease +fi +cp build/outputs/apk/"$_RELEASE_TYPE_NAME"/"$_APK_BASENAME"-"$_RELEASE_TYPE_NAME""$_RELEASE_TYPE_APK_NAME".apk "$_APK_BASENAME".apk + +if [[ "${_APK_BUILD_TYPE}" == "Release" ]]; then + java "-Dorg.gradle.appname=${APP_BASE_NAME}" -classpath "${CLASSPATH}" org.gradle.wrapper.GradleWrapperMain --warning-mode all bundleRelease + cp build/outputs/bundle/"$_RELEASE_TYPE_NAME"/"$_APK_BASENAME"-"$_RELEASE_TYPE_NAME""$_RELEASE_TYPE_APK_NAME".aab "$_APK_BASENAME".aab fi