78 lines
1.7 KiB
Groovy
78 lines
1.7 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE'
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
group = 'org.springframework.restdocs'
|
|
}
|
|
|
|
apply plugin: 'samples'
|
|
|
|
ext {
|
|
springVersion = '4.1.7.RELEASE'
|
|
jmustacheVersion = '1.10'
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'io.spring.dependency-management'
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.springframework:spring-framework-bom:$springVersion"
|
|
}
|
|
dependencies {
|
|
dependency 'com.fasterxml.jackson.core:jackson-databind:2.4.6'
|
|
dependency "com.samskivert:jmustache:$jmustacheVersion"
|
|
dependency 'javax.servlet:javax.servlet-api:3.1.0'
|
|
dependency 'junit:junit:4.12'
|
|
dependency 'org.hamcrest:hamcrest-core:1.3'
|
|
dependency 'org.hamcrest:hamcrest-library:1.3'
|
|
dependency 'org.mockito:mockito-core:1.10.19'
|
|
dependency 'org.springframework.hateoas:spring-hateoas:0.17.0.RELEASE'
|
|
dependency 'org.jacoco:org.jacoco.agent:0.7.2.201409121644'
|
|
}
|
|
}
|
|
}
|
|
|
|
samples {
|
|
dependOn 'spring-restdocs:install'
|
|
|
|
restNotesSpringHateoas {
|
|
workingDir 'samples/rest-notes-spring-hateoas'
|
|
}
|
|
|
|
restNotesSpringDataRest {
|
|
workingDir 'samples/rest-notes-spring-data-rest'
|
|
}
|
|
}
|
|
|
|
task docsZip(type: Zip, dependsOn: [':docs:asciidoctor', ':spring-restdocs:javadoc']) {
|
|
group = 'Distribution'
|
|
baseName = 'spring-restdocs'
|
|
classifier = 'docs'
|
|
description = 'Builds -${classifier} archive containing API and reference documentation'
|
|
destinationDir = file("${project.buildDir}/distributions")
|
|
|
|
from (project.tasks.findByPath(':docs:asciidoctor')) {
|
|
into 'reference'
|
|
}
|
|
|
|
from (project.tasks.findByPath(':spring-restdocs:javadoc')) {
|
|
into 'api'
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
archives
|
|
}
|
|
|
|
artifacts {
|
|
archives docsZip
|
|
} |