summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprepareForDistribution.sh55
1 files changed, 37 insertions, 18 deletions
diff --git a/prepareForDistribution.sh b/prepareForDistribution.sh
index 4b60a6c2..047fcfae 100755
--- a/prepareForDistribution.sh
+++ b/prepareForDistribution.sh
@@ -243,34 +243,53 @@ then
fi
fi
- ./cleanProject.sh || quit
- ./build_deps.sh || quit
+ #./cleanProject.sh || quit
+ #./build_deps.sh || quit
mkdir $PREPARE_FOR_DISTRIBUTION_FILE_DIR
if [[ ${BETA} == true ]]
then
./gradlew clean assemble${FLAVOR}ProductionFatBeta --stacktrace || quit
cp $BASE_FILE_DIR/${FLAVOR}ProductionFat/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionX86Beta --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionX86/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionX86_64Beta --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionX86_64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionArmv7Beta --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv7/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionArm64Beta --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ # custom builds might have disabled split apks -> check if build task exist
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionX86Beta) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionX86Beta --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionX86/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionX86_64Beta) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionX86_64Beta --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionX86_64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionArmv7Beta) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionArmv7Beta --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv7/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionArmv7Beta) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionArm64Beta --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
else
./gradlew clean assemble${FLAVOR}ProductionFatRelease --stacktrace || quit
cp $BASE_FILE_DIR/${FLAVOR}ProductionFat/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionX86Release --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionX86/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionX86_64Release --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionX86_64/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionArmv7Release --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv7/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
- ./gradlew clean assemble${FLAVOR}ProductionArm64Release --stacktrace || quit
- cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+
+ # custom builds might have disabled split apks -> check if build task exist
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionX86Release) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionX86Release --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionX86/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionX86_64Release) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionX86_64Release --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionX86_64/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductioArmv7Release) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionArmv7Release --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv7/release/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
+ if [[ $(./gradlew tasks --console plain | grep ${FLAVOR}ProductionArm64Release) ]]; then
+ ./gradlew clean assemble${FLAVOR}ProductionArm64Release --stacktrace || quit
+ cp $BASE_FILE_DIR/${FLAVOR}ProductionArmv64/beta/*.apk $PREPARE_FOR_DISTRIBUTION_FILE_DIR
+ fi
fi
fi