LoginSignup
0
0

More than 5 years have passed since last update.

GradleのCoveturaPlugin設定

Posted at
apply plugin: 'java'
apply plugin: 'groovy'

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath "net.saliman:gradle-cobertura-plugin:2.0.0"
  }
  buildDir = 'target'
}

apply plugin: 'cobertura'

group = 'org.me'
version = '0.1'
sourceCompatibility = 1.7
targetCompatibility = 1.7
def isOnJenkins = System.properties.containsKey('jenkins')

cobertura.coverageFormats = (isOnJenkins)?['xml']:['html']

Jenkinsの設定でswitchesに-Djenkinsと設定しておくとxmlファイルでレポートされる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0