Created
July 22, 2018 11:15
-
-
Save warnyul/db08de57eb1ea36156b1bfb8de269744 to your computer and use it in GitHub Desktop.
Travis CI - Kotlin Multiplatform
This file contains 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
#!/bin/sh | |
mkdir -p $HOME/android-sdk-dl | |
if test ! -e $HOME/android-sdk-dl/sdk-tools.zip; then | |
curl https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip | |
fi | |
unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d $ANDROID_HOME | |
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism) | |
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;27.0.3' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;m2repository' > /dev/null |
This file contains 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
language: objective-c | |
osx_image: xcode9.4 | |
cache: | |
- directories: | |
# Gradle dependencies | |
- $HOME/.gradle/caches/ | |
- $HOME/.gradle/wrapper/ | |
# Kotlin native | |
- $HOME/.konan/cache | |
script: | |
- ./gradlew clean build |
This file contains 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
language: objective-c | |
osx_image: xcode9.4 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | |
cache: | |
- directories: | |
# Android SDK | |
- $HOME/android-sdk-dl | |
- $HOME/android-sdk | |
# Gradle dependencies | |
- $HOME/.gradle/caches/ | |
- $HOME/.gradle/wrapper/ | |
# Android build cache (see http://tools.android.com/tech-docs/build-cache) | |
- $HOME/.android/build-cache | |
- $HOME/.konan/cache | |
install: | |
- gem install cocoapods --version 1.4.0 | |
# Download and unzip the Android SDK tools (if not already there thanks to the cache mechanism) | |
# Latest version available here: https://developer.android.com/studio/index.html#downloads | |
- mkdir -p $HOME/android-sdk-dl | |
- if test ! -e $HOME/android-sdk-dl/sdk-tools.zip ; then curl https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip ; fi | |
- unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d $ANDROID_HOME | |
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism) | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools' > /dev/null | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;27.0.3' > /dev/null | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null | |
- yes | $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;m2repository' > /dev/null | |
env: | |
- ANDROID_HOME=$HOME/android-sdk JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' | |
script: | |
- ./gradlew clean build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment