Files
spring-restdocs/build.gradle
2015-04-20 19:48:35 +01:00

93 lines
2.2 KiB
Groovy

project(':spring-restdocs') {
ext {
jacksonVersion = '2.3.4'
jacocoVersion = '0.7.2.201409121644'
junitVersion = '4.11'
servletApiVersion = '3.1.0'
springHateoasVersion = '0.17.0.RELEASE'
springVersion = '4.1.4.RELEASE'
mockitoVersion = '1.10.19'
}
group = 'org.springframework.restdocs'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'sonar-runner'
sonarRunner {
sonarProperties {
property 'sonar.jacoco.reportPath', "${buildDir.name}/jacoco.exec"
property 'sonar.java.coveragePlugin', 'jacoco'
property 'sonar.links.ci', 'https://build.spring.io/browse/SRD'
property 'sonar.links.homepage', 'https://github.com/spring-projects/spring-restdocs'
property 'sonar.links.issue', 'https://github.com/spring-projects/spring-restdocs'
property 'sonar.links.scm', 'https://github.com/spring-projects/spring-restdocs'
}
}
configurations {
jacoco
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from project.sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier = "javadoc"
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
eclipseJdt.onlyIf { false }
cleanEclipseJdt.onlyIf { false }
dependencies {
compile "junit:junit:$junitVersion"
compile "org.springframework:spring-test:$springVersion"
compile "org.springframework:spring-web:$springVersion"
compile "javax.servlet:javax.servlet-api:$servletApiVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
jacoco "org.jacoco:org.jacoco.agent:$jacocoVersion:runtime"
testCompile "org.springframework:spring-webmvc:$springVersion"
testCompile "org.springframework.hateoas:spring-hateoas:$springHateoasVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
}
test {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.restdocs.*"
}
}
apply plugin: 'samples'
samples {
dependOn 'spring-restdocs:install'
restNotesSpringHateoas {
workingDir 'samples/rest-notes-spring-hateoas'
}
restNotesSpringDataRest {
workingDir 'samples/rest-notes-spring-data-rest'
}
}
wrapper {
gradleVersion = '2.3'
}