view metrics.gradle @ 126:b2532280341e

CM-133: switch to sonar-runner
author smith@nwoca.org
date Tue, 04 Jun 2013 16:50:46 +0100
parents 740e905fce78
children c93df17513f1
line wrap: on
line source

apply plugin: "sonar-runner"

ant.property(file: System.getProperty('user.home') + "/.ssdt/sonar.properties")

buildscript {
  repositories {
        maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' }
        maven { url 'http://repos.ssdt.nwoca.org/artifactory/repository' }
        maven { url 'http://repos.ssdt.nwoca.org/artifactory/libs-snapshots' }
   }
    dependencies {
        classpath "me.davesmith:gradle-cobertura-plugin:1.0.2.SNAPSHOT"
        classpath "net.sourceforge.cobertura:cobertura:1.9.4.1"
    }
}

sonarRunner {
    sonarProperties {
        property "sonar.host.url", "http://sonar.ssdt-ohio.org/"
        property "sonar.jdbc.url", ant.properties['sonar.jdbc.url']
        property "sonar.jdbc.driverClassName", ant.properties['sonar.jdbc.driverClassName']
        property "sonar.jdbc.username", ant.properties['sonar.jdbc.username']
        property "sonar.jdbc.password", ant.properties['sonar.jdbc.password']
    }
}

allprojects {
    afterEvaluate { project ->

        def groovyProject = project.plugins.hasPlugin('groovy')

        sonarRunner {
            sonarProperties {
                property "sonar.language", groovyProject ? 'grvy' : 'java'
            }
        }
    }
}