From 7d044eac4714cca1268859434ff06d8659c621d0 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 26 May 2017 14:53:17 +0530 Subject: [PATCH] Fix Travis Integration --- .travis.yml | 4 +++ gradle/bintray.gradle | 36 ++++++++++--------- .../stitchlib/ExampleInstrumentedTest.java | 27 -------------- 3 files changed, 23 insertions(+), 44 deletions(-) delete mode 100644 stitch-lib/src/androidTest/java/amitkma/stitchlib/ExampleInstrumentedTest.java diff --git a/.travis.yml b/.travis.yml index 6c0bdf2..67adc23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,10 @@ android: - extra-android-m2repository script: - ./gradlew build +cache: + directories: + - $HOME/.m2 + - $HOME/.gradle branches: only: - master diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle index 7d31afc..35870f0 100644 --- a/gradle/bintray.gradle +++ b/gradle/bintray.gradle @@ -46,25 +46,27 @@ artifacts { } Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) +if(project.rootProject.file('local.properties').exists()){ + properties.load(project.rootProject.file('local.properties').newDataInputStream()) -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") + bintray { + user = properties.getProperty("bintray.user") + key = properties.getProperty("bintray.apikey") - configurations = ['archives'] - publish = true - pkg { - repo = 'maven' - name = project.name - websiteUrl = githubUrl - vcsUrl = gitUrl - licenses = ["Apache-2.0"] - version { - gpg { - sign = true //Determines whether to GPG sign the files. The default is false - passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing' + configurations = ['archives'] + publish = true + pkg { + repo = 'maven' + name = project.name + websiteUrl = githubUrl + vcsUrl = gitUrl + licenses = ["Apache-2.0"] + version { + gpg { + sign = true //Determines whether to GPG sign the files. The default is false + passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing' + } } } } -} \ No newline at end of file +} diff --git a/stitch-lib/src/androidTest/java/amitkma/stitchlib/ExampleInstrumentedTest.java b/stitch-lib/src/androidTest/java/amitkma/stitchlib/ExampleInstrumentedTest.java deleted file mode 100644 index 071cf70..0000000 --- a/stitch-lib/src/androidTest/java/amitkma/stitchlib/ExampleInstrumentedTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package amitkma.stitchlib; - -import static org.junit.Assert.assertEquals; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -/** - * Instrumentation test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("co.amiktma.stitch.test", appContext.getPackageName()); - } -}