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.7.BUILD-SNAPSHOT' configurations { asciidoctorExtensions } dependencies { asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'junit', module: 'junit;' } testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' testImplementation 'org.junit.jupiter:junit-jupiter-api' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' } test { outputs.dir snippetsDir useJUnitPlatform() } asciidoctor { configurations "asciidoctorExtensions" inputs.dir snippetsDir dependsOn test } bootJar { dependsOn asciidoctor from ("${asciidoctor.outputDir}/html5") { into 'static/docs' } } eclipseJdt.onlyIf { false } cleanEclipseJdt.onlyIf { false }