sudo: required branches: only: - master git: depth: 1 env: global: - CORDOVA_PLATFORM=browser - NODE_VERSION=10 - CORDOVA_VERSION=10 - ANGULAR_CLI_VERSION=8 - IONIC_VERSION=6 - ANDROID_API_LEVEL=30 - ANDROID_SDK_VERSION=30 - ANDROID_BUILD_TOOLS_VERSION=30.0.3 - ANDROID_ABI=armeabi-v7a - JAVA_HOME=/usr/lib/jvm/java-8-oracle install: - "nvm install $NODE_VERSION" - "npm install -g gulp-cli" - "npm install -g cordova@$CORDOVA_VERSION" - "npm install -g @angular/cli@$ANGULAR_CLI_VERSION" - "npm install -g @ionic/cli@$IONIC_VERSION" - "npm install -g cordova-res" - "npm ci" matrix: include: - language: node_js env: CORDOVA_PLATFORM=browser node_js: - "12" cache: directories: - node_modules - plugins - platforms - language: android os: linux env: CORDOVA_PLATFORM=android jdk: oraclejdk8 dist: xenial addons: apt: packages: - oracle-java8-installer - oracle-java8-set-default - jq android: components: # Uncomment the lines below if you want to # use the latest revision of Android SDK Tools - tools - platform-tools # The BuildTools version used - build-tools-29.0.2 # The SDK version used to compile - android-29 # Additional components - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository # Specify at least one system image, # if you need to run emulator(s) during your tests licenses: - android-sdk-preview-license-.+ - android-sdk-license-.+ - android-sdk-license-29 - google-gdk-license-.+ before_install: - export LANG=en_US.UTF-8 - touch $HOME/.android/repositories.cfg - yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL" - yes | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION" before_cache: - "rm -f $HOME/.gradle/caches/modules-2/modules-2.lock" - "rm -fr $HOME/.gradle/caches/*/plugin-resolution/" cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ - $HOME/.android/build-cache - node_modules - language: objective-c os: osx osx_image: xcode11 env: CORDOVA_PLATFORM=ios before_install: - rvm use system #- sudo gem install bundler #- sudo gem install xcpretty --no-rdoc --no-ri --no-document --quiet #- sudo gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet #- sudo gem install cocoapods --pre # Since Travis is not always on latest version cache: directories: - node_modules after_script: # Test ios_arch - "cordova platform remove $CORDOVA_PLATFORM --verbose" - "cordova platform add $CORDOVA_PLATFORM@latest --verbose" #- "cordova build $CORDOVA_PLATFORM --verbose --device" script: # Get current branch and repository - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) - export REPO_SLUG=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_REPO_SLUG; else echo $TRAVIS_PULL_REQUEST_SLUG; fi) # Lint and Build plugin - "npm run lint" - "gulp browserify" # Test Plugin platform build with ionic - "ionic start myApp blank; cd myApp;" - "ionic cordova platform add $CORDOVA_PLATFORM@latest --verbose" - "ionic cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose" - "ionic cordova build $CORDOVA_PLATFORM --verbose" # Test Plugin platform build with cordova only - "cordova create myApp org.apache.cordova.myApp myApp; cd myApp;" - "cordova platform add $CORDOVA_PLATFORM@latest --verbose" - "cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose" - "cordova build $CORDOVA_PLATFORM --verbose"