Created
May 1, 2019 17:43
-
-
Save dinorahto/592cb013c38a3e323146f40aaa6f7339 to your computer and use it in GitHub Desktop.
Bitbucket Pipelines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| image: java:8 | |
| pipelines: | |
| branches: | |
| deployment: | |
| - step: | |
| caches: | |
| - gradle | |
| - android-sdk | |
| script: | |
| - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip | |
| - unzip -o -qq android-sdk.zip -d android-sdk | |
| - export ANDROID_HOME="/opt/atlassian/pipelines/agent/build/android-sdk" | |
| - export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH" | |
| - yes | sdkmanager "platform-tools" | |
| - yes | sdkmanager "platforms;android-28" | |
| - yes | sdkmanager "build-tools;28.0.2" | |
| - yes | sdkmanager "extras;android;m2repository" | |
| - yes | sdkmanager "extras;google;m2repository" | |
| - yes | sdkmanager "extras;google;instantapps" | |
| - yes | sdkmanager --licenses | |
| - echo "Start" | |
| #Testing gradle | |
| - ./gradlew testDebugUnitTest | |
| # Build apk and distribute | |
| - chmod a+x ./gradlew | |
| - ./gradlew assembleDebug crashlyticsUploadDistributionDebug | |
| - echo "only development branch" | |
| definitions: | |
| caches: | |
| android-sdk: android-sdk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment