I am tying to use Travis CI for Android build for the projects in GitHub. I have created the following .travis.yml file in GitHub and when the project build is triggered it gives build success.
The script is:
language: android
jdk: oraclejdk8
env:
matrix:
- ANDROID_TARGET=android-23 ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-26.0.1
- android-23
- extra-android-m2repository
- sys-img-armeabi-v7a-android-23
- extra-android-support
- extra-android-m2repository
licenses:
- 'android-sdk-license-.+'
script:
- chmod +x ./gradlew
But now when I put some error in the .java or .xml file to trigger another, build, the build goes through and it does not fail. Can you please let me know as to what changes to I need to make in the .travis.yml file.
Update (10/18):
Based on the accepted answer and other SO posts the updated YML which worked is the following:
language: android
jdk: oraclejdk8
env:
matrix:
- ANDROID_TARGET=android-26 ANDROID_ABI=armeabi-v7a
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.1
- android-26
- extra-android-m2repository
- sys-img-armeabi-v7a-android-26
- extra-android-support
licenses:
- android-sdk-preview-license-52d11cd2
- android-sdk-license-.+
- google-gdk-license-.+
before_script:
- chmod +x ./gradlew
script:
- ./gradlew build
Your script section does nothing but make the gradle script executable. You need to actually execute it too.
script:
- chmod +x ./gradlew
- ./gradlew
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments