57 lines
1.1 KiB
Groovy
57 lines
1.1 KiB
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-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.3'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
outputs.dir snippetsDir
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
inputs.dir snippetsDir
|
|
dependsOn test
|
|
}
|
|
|
|
bootJar {
|
|
dependsOn asciidoctor
|
|
from ("${asciidoctor.outputDir}") {
|
|
into 'static/docs'
|
|
}
|
|
}
|