forked from noveogroup/android-check
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
41 lines (41 loc) · 1.34 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
sudo: required
language: android
jdk: oraclejdk8
branches:
except:
- /^[0-9]/ # Workaround to not to trigger Travis with tags - https://github.com/travis-ci/travis-ci/issues/1532
android:
components:
- tools
- platform-tools
- android-27
- build-tools-28.0.3
before_install:
- cd .. && mv android-check-2 android-check && cd android-check # Required by the release plugin since Gradle 4.8
- yes | sdkmanager "platforms;android-27"
- printf "bintray.user=$BINTRAY_USER\nbintray.key=$BINTRAY_KEY\ngradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\n" > plugin/gradle.properties
- cd plugin
- ./gradlew publishToMavenLocal
- cd ..
before_script:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
echo "Do not open PRs against master; merge dev into master locally and push instead."
exit 1
fi
- cd sample
script:
- ./gradlew check --refresh-dependencies --rerun-tasks --stacktrace
after_success:
- cd ..
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
echo "CI on master succeded. Executing release tasks..."
git fetch --unshallow
cd plugin
./gradlew bintrayUpload publishPlugins
./ci/tag_release.sh
cd ..
fi
notifications:
email: false