Skip to content

Commit

Permalink
Merge pull request #1 from LachlanMcKee/feature/sonarqube-support
Browse files Browse the repository at this point in the history
Added sonarqube support
  • Loading branch information
LachlanMcKee authored Nov 19, 2017
2 parents af72914 + 703b9a1 commit 2956126
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
language: android

notifications:
email: false

android:
components:
- tools
- platform-tools
- build-tools-25.0.1
- android-25

jdk:
- oraclejdk8

branches:
except:
- gh-pages

notifications:
email: false
only:
- master
- develop

sudo: false
script:
- if [ $TRAVIS_PULL_REQUEST != 'false' ];
then ./gradlew sonarqube -Dsonar.analysis.mode=preview -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=lachlanmckee-github -Dsonar.login=$SONAR_TOKEN -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST -Dsonar.github.repository=LachlanMcKee/timber-junit-rule -Dsonar.github.oauth=$GITHUB_TOKEN;
else ./gradlew sonarqube -Dsonar.analysis.mode=publish -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=lachlanmckee-github -Dsonar.login=$SONAR_TOKEN;
fi

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/

before_install:
- chmod +x gradlew
Expand Down
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ buildscript {
}
}

plugins {
id "org.sonarqube" version "2.5"
}

allprojects {
repositories {
mavenCentral()
Expand All @@ -21,4 +25,11 @@ ext {
buildToolsVersion = '25.0.1'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}

sonarqube {
properties {
property "sonar.projectName", "Timber JUnit Rule"
property "sonar.projectKey", "timber-junit-rule"
}
}

0 comments on commit 2956126

Please sign in to comment.