-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (59 loc) · 1.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
snippetsDir = file('build/generated-snippets')
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
plugins {
id "org.asciidoctor.convert" version "1.5.2"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'person-service'
version = '0.0.1-SNAPSHOT'
dependsOn asciidoctor
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('com.h2database:h2')
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.4.6.RELEASE'
compile group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc', version: '1.2.1.RELEASE'
compile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.8.0'
compile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testCompile('org.springframework.boot:spring-boot-starter-test')
//testCompile("org.springframework.restdocs:spring-restdocs-mockmvc:1.0.0.RELEASE")
}
test{
outputs.dir snippetsDir
}
asciidoctor{
attributes 'snippets': snippetsDir
inputs.dir snippetsDir
outputDir "build/asciidoc"
dependsOn test
sourceDir 'src/main/asciidoc'
}
task copyRestDocs(type: Copy) {
dependsOn asciidoctor
from "${asciidoctor.outputDir}/html5"
into "${sourceSets.main.output.resourcesDir}/static/docs"
}
bootRun {
dependsOn copyRestDocs
}