Add TestNG sample
This commit is contained in:
53
testng/build.gradle
Normal file
53
testng/build.gradle
Normal file
@@ -0,0 +1,53 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "org.asciidoctor.jvm.convert" version "3.3.2"
|
||||
id "org.springframework.boot" version "3.0.0-M4"
|
||||
}
|
||||
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
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-web'
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
|
||||
testImplementation 'org.testng:testng:7.6.0'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
outputs.dir snippetsDir
|
||||
}
|
||||
|
||||
asciidoctor {
|
||||
configurations "asciidoctorExtensions"
|
||||
inputs.dir snippetsDir
|
||||
dependsOn test
|
||||
}
|
||||
|
||||
bootJar {
|
||||
dependsOn asciidoctor
|
||||
from ("${asciidoctor.outputDir}/html5") {
|
||||
into 'static/docs'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user