From 945bfd47711eb51871ffbd20c6e4182056a8b523 Mon Sep 17 00:00:00 2001 From: jessyan Date: Fri, 31 Mar 2017 14:36:29 +0800 Subject: [PATCH] add to travis --- .travis.yml | 23 +++++++++++++++++++++++ MVPArms.md | 1 + README.md | 1 + arms/bintray.gradle | 11 ++++++++--- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c81eb83 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: android +jdk: oraclejdk8 + +env: + global: + - ANDROID_API_LEVEL=25 + - ANDROID_BUILD_TOOLS_VERSION=25.0.2 + +android: + components: + # The BuildTools version used by your project + - tools + - platform-tools + - build-tools-$ANDROID_BUILD_TOOLS_VERSION + - extra-android-m2repository + - extra-google-android-support + + # The SDK version used to compile your project + - android-$ANDROID_API_LEVEL + licenses: + - '.+' + +script: "./gradlew build" \ No newline at end of file diff --git a/MVPArms.md b/MVPArms.md index 14cc747..39db3d9 100644 --- a/MVPArms.md +++ b/MVPArms.md @@ -1,5 +1,6 @@ # MVPArms [ ![Bintray](https://img.shields.io/badge/bintray-v1.2.4-brightgreen.svg) ](https://bintray.com/jessyancoding/maven/MVPArms/1.2.4/link) +[ ![Build Status](https://travis-ci.org/JessYanCoding/MVPArms.svg?branch=master) ](https://travis-ci.org/JessYanCoding/MVPArms) [ ![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat-square) ](https://developer.android.com/about/versions/android-4.0.3.html) [ ![License](http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square) ](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/README.md b/README.md index fa9632c..4428935 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # MVPArms [ ![Bintray](https://img.shields.io/badge/bintray-v1.2.4-brightgreen.svg) ](https://bintray.com/jessyancoding/maven/MVPArms/1.2.4/link) +[ ![Build Status](https://travis-ci.org/JessYanCoding/MVPArms.svg?branch=master) ](https://travis-ci.org/JessYanCoding/MVPArms) [ ![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat-square) ](https://developer.android.com/about/versions/android-4.0.3.html) [ ![License](http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square) ](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/arms/bintray.gradle b/arms/bintray.gradle index 31ee38e..40fe1a2 100644 --- a/arms/bintray.gradle +++ b/arms/bintray.gradle @@ -2,7 +2,11 @@ apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.dcendents.android-maven' Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) +boolean isHasFile = false +if (project.rootProject.findProject('local.properties') != null){ + isHasFile = true + properties.load(project.rootProject.file('local.properties').newDataInputStream()) +} def gitUrl = 'https://github.com/JessYanCoding/MVPArms.git' // Git仓库的url def siteUrl = 'https://github.com/JessYanCoding/MVPArms' // 项目的主页 @@ -12,8 +16,9 @@ group = "me.jessyan" bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") + user = isHasFile ? properties.getProperty("bintray.user") : System.getenv("bintray.user") + key = isHasFile ? properties.getProperty("bintray.apikey") : System.getenv("bintray.apikey") + pkg { repo = 'maven' name = 'MVPArms' -- GitLab