60 lines
1.2 KiB
Groovy
60 lines
1.2 KiB
Groovy
plugins {
|
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
|
|
repositories {
|
|
mavenLocal {
|
|
content {
|
|
includeGroup("org.springframework.restdocs")
|
|
}
|
|
}
|
|
maven { url 'https://repo.spring.io/milestone' }
|
|
maven { url 'https://repo.spring.io/snapshot' }
|
|
mavenCentral()
|
|
}
|
|
|
|
group = 'com.example'
|
|
|
|
sourceCompatibility = 17
|
|
targetCompatibility = 17
|
|
|
|
ext {
|
|
restdocsVersion = '3.0.0-SNAPSHOT'
|
|
snippetsDir = file('build/generated-snippets')
|
|
}
|
|
|
|
configurations {
|
|
asciidoctorExtensions
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctorExtensions "org.springframework.restdocs:spring-restdocs-asciidoctor:$restdocsVersion"
|
|
|
|
implementation platform("org.springframework:spring-framework-bom:6.0.0-M4")
|
|
implementation 'org.springframework:spring-context'
|
|
implementation 'org.springframework:spring-webflux'
|
|
|
|
testImplementation 'junit:junit:4.13.1'
|
|
testImplementation "org.springframework.restdocs:spring-restdocs-webtestclient:$restdocsVersion"
|
|
}
|
|
|
|
test {
|
|
outputs.dir snippetsDir
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
inputs.dir snippetsDir
|
|
dependsOn test
|
|
}
|
|
|
|
jar {
|
|
dependsOn asciidoctor
|
|
from ("${asciidoctor.outputDir}/html5") {
|
|
into 'static/docs'
|
|
}
|
|
}
|