Skip to content

Commit

Permalink
Add sonar and jacoco. add "build" task for local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
crc83 committed Mar 29, 2018
1 parent ff97991 commit 5c9b683
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ buildscript {

dependencies {
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.9'
classpath 'net.researchgate:gradle-release:2.6.0'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
classpath 'net.researchgate:gradle-release:2.6.0'
}
}

Expand All @@ -23,6 +24,8 @@ apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'net.researchgate.release'
apply plugin: 'jacoco'
apply plugin: 'org.sonarqube'

sourceCompatibility = 1.6
targetCompatibility = 1.6
Expand All @@ -32,7 +35,11 @@ repositories {
}

release {
buildTasks = ['publishPlugins']
buildTasks = ['publishPlugins']
}

task build(type: GradleBuild) {
tasks = ['jar', 'test', 'jacocoTestReport', 'sonarqube']
}

sourceSets {
Expand Down Expand Up @@ -73,6 +80,17 @@ task wrapper(type: Wrapper) {
gradleVersion = '4.3.1'
}

sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.organization", "crc83-github"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", "${github_sonar_token}"
}
}



pluginBundle {
website = 'https://github.com/crc83/gradle-jenkins-plugin'
vcsUrl = 'https://github.com/crc83/gradle-jenkins-plugin'
Expand All @@ -94,5 +112,5 @@ pluginBundle {
}

test {
ignoreFailures = true
ignoreFailures = true
}

0 comments on commit 5c9b683

Please sign in to comment.