Skip to content

Commit

Permalink
Android 32 setup attempt #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolthulhu committed Oct 8, 2020
1 parent 3a9b01e commit 6f00519
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
sources: *apt_sources

# Android
- env: NATIVE=android BUILD_NAME=android DEPLOY=1
- env: NATIVE=android BUILD_NAME=android64 DEPLOY=1
name: "Android ARM 64"
language: android
dist: trusty
Expand All @@ -137,6 +137,16 @@ jobs:
- android-16
- platform-tools

- env: NATIVE=android BUILD_NAME=android32 DEPLOY=1 ANDROID32=1
name: "Android ARM 32"
language: android
dist: trusty
android:
components:
- build-tools-16
- android-16
- platform-tools

# Finally check the compiler variants
- stage: compilers
env: COMPILER=g++ MODS=--mods=magiclysm LOCALIZE=0
Expand Down
10 changes: 5 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ android {
versionCode Integer.valueOf(System.env.UPSTREAM_BUILD_NUMBER ?: 1)
versionName new File("$version_header_path").text.split('\"')[1]
if (buildAsApplication) {
applicationId "com.cleverraven.cataclysmdda"
setProperty("archivesBaseName", "cataclysmdda-" + versionName)
applicationId "com.cleverraven.cataclysmbn"
setProperty("archivesBaseName", "cataclysmbn-" + versionName)
}
resValue "string", "app_name", "Cataclysm DDA"
resValue "string", "app_name", "Cataclysm BN"

splits {
// Configures multiple APKs based on ABI.
Expand Down Expand Up @@ -242,12 +242,12 @@ android {
productFlavors {
stable {
dimension "version"
resValue "string", "app_name", "Cataclysm DDA"
resValue "string", "app_name", "Cataclysm BN"
}
experimental {
dimension "version"
applicationIdSuffix ".experimental"
resValue "string", "app_name", "Cataclysm DDA (experimental)"
resValue "string", "app_name", "Cataclysm BN (experimental)"
}
}

Expand Down
9 changes: 8 additions & 1 deletion build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,17 @@ then
# content rather than the size+mtime (which is ccache's default behavior).
export CCACHE_COMPILERCHECK=content

if [ "$ANDROID32" == 1 ]
then
ANDROID_ABI="-Pabi_arm_32=true -Pabi_arm_64=false"
else
ANDROID_ABI="-Pabi_arm_32=false -Pabi_arm_64=true"
fi

cd android
# Specify dumb terminal to suppress gradle's constant output of time spent building, which
# fills the log with nonsense.
TERM=dumb ./gradlew assembleExperimentalRelease -Pj=$num_jobs -Plocalize=false -Pabi_arm_32=false -Pabi_arm_64=true -Poverride_version=${TRAVIS_BUILD_NUMBER} \
TERM=dumb ./gradlew assembleExperimentalRelease -Pj=$num_jobs -Plocalize=false $ANDROID_ABI -Poverride_version=${TRAVIS_BUILD_NUMBER} \
-Pdeps="${HOME}/build/${TRAVIS_REPO_SLUG}/android/app/deps.zip"
else
if [ "$DEPLOY" == 1 -a "$NATIVE" == "osx" ]
Expand Down

0 comments on commit 6f00519

Please sign in to comment.