Skip to content

Commit

Permalink
Sonarqube config in build.gradle and circe.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed Ben Abderrahmane committed Jan 29, 2016
1 parent 9af8dd4 commit c2d6bb5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
48 changes: 48 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@
description = "Sample project to introduce Git, Gradle and CircleCI"


task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.sonarqube'
apply plugin: 'sonar-runner'


sonarqube {
properties {
property "sonar.projectName", "Java :: Simple Project :: SonarQube Scanner for Gradle"
property "sonar.projectVersion", "1.0"
property "sonar.projectKey", "org.sonarqube:java-gradle-simple"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
property "sonar.host.url", "http://sonar.tutor.com"
}
}

sonarRunner {
sonarProperties {
property "sonar.projectName", "Java :: Simple Project :: SonarQube Scanner for Gradle (sonarRunner plugin)"
property "sonar.projectVersion", "1.0"
property "sonar.projectKey", "org.sonarRunner:java-gradle-simple"
property "sonar.jacoco.reportPath", "${project.buildDir}/jacoco/test.exec"
property "sonar.host.url", "http://sonar.tutor.com"
property "sonar.jdbc.url", "jdbc:mysql://sonar.tuto.com/sonar"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "ahmed"
property "sonar.jdbc.password", "ahmed"
}
}


buildscript {
repositories {
maven {
url "http://repo1.maven.org/maven2/"
}
maven {
url "https://plugins.gradle.org/m2/"
}
mavenLocal()
}
dependencies {
classpath 'org.codehaus.sonar.runner:sonar-runner-dist:2.4'
classpath 'org.ajoberstar:gradle-jacoco:0.1.0'
classpath 'org.sonarqube.gradle:gradle-sonarqube-plugin:1.0'
}
}


repositories { mavenCentral() }


dependencies {
compile([
'commons-collections:commons-collections:3.2',
Expand Down
6 changes: 6 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ dependencies:
# - "~/.gradle"
# - "build"

test:
override:
- GRADLE_OPTS="-Xmx512m" ./gradlew sonarqube



0 comments on commit c2d6bb5

Please sign in to comment.