Skip to content

Instantly share code, notes, and snippets.

@mgilangjanuar
Created September 29, 2017 00:34
Show Gist options
  • Save mgilangjanuar/ac91f190b424cb1dad27a46a730edb21 to your computer and use it in GitHub Desktop.
Save mgilangjanuar/ac91f190b424cb1dad27a46a730edb21 to your computer and use it in GitHub Desktop.
Shippable script for build APK
archive: true
language: java
jdk:
- oraclejdk8
env:
global:
- secure: piG+Av7MScG4alcaJbf/ru6dooEURNAWU+V8OPr2w9zMcn82WxOYlyPqe4SIcB1izTLgNzC76YeebQGmHonH96V0fhTPWon1PXZEoYEbzAyPLuzxw1uYd6END+/+ClEyOHG+gverROmQxq6tbj4Ix7YUMjMHTgNhotbnWL4KShaTV9XiGFMG+U96h0Bp2hmSD0y5E/XeDYieXcjw+JVyf2CRnYX64IMv8uUP0YFZ66NpUWuxsdkgxlk5RNJJm6yIQanm+eE37mjjzQ6S0tJ5KzRuBDXLHtuh8yDFoguHKRtMkihL3JBXc3wzL6kwWcuAL/nL+c5A32akGUsDXXBUKg==
install:
- sudo apt-get update
- sudo apt-get install -u lib32stdc++6 lib32z1
- echo "Downloading SDK (may take awhile)..."
- wget --quiet --output-document=android-sdk-tools.zip https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
- unzip android-sdk-tools.zip
- rm -f android-sdk-tools.zip
- echo "sdk.dir=`pwd`" > local.properties
- echo y | tools/android --silent update sdk --no-ui --all --filter android-25
- echo y | tools/android --silent update sdk --no-ui --all --filter platform-tools
- echo y | tools/android --silent update sdk --no-ui --all --filter build-tools-25.0.2
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services
- echo y | tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository
- mkdir licenses
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > licenses/android-sdk-license
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > licenses/android-sdk-preview-license
before_script:
- mkdir -p shippable/reports
- mkdir -p shippable/apks
script:
- ./gradlew clean
- ./gradlew assemble
- ./gradlew check
after_script:
- cp -r app/build/reports/* shippable/reports/
- cp -r app/build/outputs/apk/ shippable/apks/
- aws s3 sync shippable "s3://goscele" --region "us-east-1"
notifications:
email:
recipients:
- mgilangjanuar@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment