Skip to content

Commit

Permalink
Travis config is added
Browse files Browse the repository at this point in the history
  • Loading branch information
tasomaniac committed Jul 15, 2015
1 parent cc9448d commit 755044c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .buildscript/deploy_snapshot.sh
@@ -0,0 +1,26 @@
#!/bin/bash
#
# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo.
#
# Adapted from https://coderwall.com/p/9b_lfq and
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/

SLUG="tasomaniac/EmailAutoCompleteTextView"
JDK="oraclejdk7"
BRANCH="master"

set -e

if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "Skipping snapshot deployment: was pull request."
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
else
echo "Deploying snapshot..."
./gradlew clean uploadArchives
echo "Snapshot deployed!"
fi
29 changes: 29 additions & 0 deletions .travis.yml
@@ -0,0 +1,29 @@
language: android

android:
components:
- build-tools-22.0.1
- extra-android-m2repository
- android-22

jdk:
- oraclejdk7

after_success:
- .buildscript/deploy_snapshot.sh

env:
global:
- secure: "bSQolHEPp3BT+8+gBjxz15+n7xuZfn9NTjxZVf6Car4tIHGjzrUuCPtS5fl5TwNpeT1TOIF5qtyXhHqpjxqa0LnSuvakSVfNWqqRxcA2oqcNDvZTqWiG1V/h2RetDV+eV+HPTfn+bhLRxPNM7ZGqJAt5nsiNEhhrpkuMY1wuCAM="
- secure: "WHreXiJzRR/P8RgqPOXZ4lZog7/k+hpqVrgstRhNtM+OZlfyvRRauOhgHXUGR+oXVAXVvfwFYsJzgqdSG/ATBYUHpnm0uu5PzOeJ4bChz8gU5YbGB2x0ae/aGjkEu5yZSlfkTXJu73dC0Ppk1qhwDGmycYFL6PV+KoBnuOGzbQM="

branches:
except:
- gh-pages


sudo: false

cache:
directories:
- $HOME/.gradle

0 comments on commit 755044c

Please sign in to comment.