73 lines
1.9 KiB
Groovy
73 lines
1.9 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
|
}
|
|
|
|
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 {
|
|
snippetsDir = file('build/generated-snippets')
|
|
restdocsVersion = '3.0.0-SNAPSHOT'
|
|
}
|
|
|
|
configurations {
|
|
asciidoctorExtensions
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctorExtensions "org.springframework.restdocs:spring-restdocs-asciidoctor:$restdocsVersion"
|
|
|
|
implementation platform("org.springframework:spring-framework-bom:6.0.0-M4")
|
|
implementation platform("org.springframework.data:spring-data-bom:2022.0.0-M4")
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:2.13.3"
|
|
implementation "jakarta.servlet:jakarta.servlet-api:5.0.0"
|
|
implementation "org.hibernate.validator:hibernate-validator:7.0.4.Final"
|
|
implementation "org.hibernate:hibernate-core-jakarta:5.6.9.Final"
|
|
implementation "org.springframework:spring-webmvc"
|
|
implementation "org.springframework.data:spring-data-jpa"
|
|
implementation "org.springframework.hateoas:spring-hateoas:2.0.0-M3"
|
|
|
|
runtimeOnly 'com.h2database:h2:2.1.210'
|
|
runtimeOnly 'org.atteo:evo-inflector:1.2.1'
|
|
|
|
testImplementation 'com.jayway.jsonpath:json-path:2.6.0'
|
|
testImplementation 'junit:junit:4.12'
|
|
testImplementation 'org.assertj:assertj-core:3.21.0'
|
|
testImplementation 'org.hamcrest:hamcrest-library:2.2'
|
|
testImplementation "org.springframework.restdocs:spring-restdocs-mockmvc:$restdocsVersion"
|
|
|
|
testRuntimeOnly 'org.glassfish:jakarta.el:4.0.2'
|
|
}
|
|
|
|
test {
|
|
outputs.dir snippetsDir
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
inputs.dir snippetsDir
|
|
dependsOn test
|
|
}
|
|
|
|
jar {
|
|
dependsOn asciidoctor
|
|
from ("${asciidoctor.outputDir}/html5") {
|
|
into 'static/docs'
|
|
}
|
|
}
|
|
|