52 lines
959 B
Groovy
52 lines
959 B
Groovy
plugins {
|
|
id "java"
|
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
|
id "org.springframework.boot" version "3.3.0"
|
|
}
|
|
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'com.example'
|
|
|
|
sourceCompatibility = 17
|
|
targetCompatibility = 17
|
|
|
|
ext {
|
|
snippetsDir = file('build/generated-snippets')
|
|
}
|
|
|
|
configurations {
|
|
asciidoctorExtensions
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.restdocs:spring-restdocs-webtestclient'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
outputs.dir snippetsDir
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
inputs.dir snippetsDir
|
|
dependsOn test
|
|
}
|
|
|
|
bootJar {
|
|
dependsOn asciidoctor
|
|
from ("${asciidoctor.outputDir}/html5") {
|
|
into 'static/docs'
|
|
}
|
|
}
|