70 lines
1.6 KiB
Groovy
70 lines
1.6 KiB
Groovy
plugins {
|
|
id "eclipse"
|
|
id "java"
|
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
|
id "org.springframework.boot" version "2.6.2"
|
|
}
|
|
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
maven { url 'https://repo.spring.io/snapshot' }
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'com.example'
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
ext {
|
|
snippetsDir = file('build/generated-snippets')
|
|
}
|
|
|
|
ext['spring-restdocs.version'] = '2.0.6.BUILD-SNAPSHOT'
|
|
|
|
configurations {
|
|
asciidoctorExtensions
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
runtimeOnly 'com.h2database:h2'
|
|
runtimeOnly 'org.atteo:evo-inflector:1.2.1'
|
|
|
|
testImplementation 'com.jayway.jsonpath:json-path'
|
|
testImplementation 'org.assertj:assertj-core'
|
|
testImplementation('org.junit.vintage:junit-vintage-engine') {
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
}
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
|
|
}
|
|
|
|
test {
|
|
outputs.dir snippetsDir
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
inputs.dir snippetsDir
|
|
dependsOn test
|
|
}
|
|
|
|
bootJar {
|
|
dependsOn asciidoctor
|
|
from ("${asciidoctor.outputDir}/html5") {
|
|
into 'static/docs'
|
|
}
|
|
}
|
|
|
|
eclipseJdt.onlyIf { false }
|
|
cleanEclipseJdt.onlyIf { false }
|