-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
115 lines (96 loc) · 2.99 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath('org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE')
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
id 'at.comm_unity.gradle.plugins.jpamodelgen' version '1.1.1'
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url 'https://repo.spring.io/libs-snapshot' }
maven { url 'https://repository.jboss.org/nexus/content/repositories/releases' }
}
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
eclipse.classpath.downloadJavadoc = true
ext {
snippetsDir = file('build/generated-snippets')
}
ext.versions = [
hibernate: '5.1.2.Final',
springRestDocs: '1.2.0.RELEASE',
hamcrest: '1.3'
]
ext['spring-restdocs.version'] = '1.2.0.RELEASE'
dependencies {
// Spring Boot
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework.boot:spring-boot-starter-data-rest'
compile 'org.springframework.data:spring-data-rest-hal-browser'
compile 'org.springframework.boot:spring-boot-starter-hateoas'
// compile 'org.springframework.boot:spring-boot-starter-mail'
compile 'org.springframework.boot:spring-boot-starter-web'
runtime 'org.springframework.boot:spring-boot-devtools'
testCompile 'org.springframework.boot:spring-boot-starter-test'
// Other Libraries
compile 'com.h2database:h2'
compile 'javax.inject:javax.inject:1'
compile "org.hibernate:hibernate-java8:${versions.hibernate}"
compile 'org.hibernate:hibernate-search-orm:5.9.2.Final'
// compile 'javax.measure:unit-api:1.0'
compile 'tec.uom:uom-se:1.0.5'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.8'
// compileOnly 'org.projectlombok:lombok:1.16.16'
compile 'org.projectlombok:lombok:1.16.16'
// Testing
// testCompile 'junit:junit'
testCompile "org.hamcrest:hamcrest-core:${versions.hamcrest}"
testCompile "org.hamcrest:hamcrest-library:${versions.hamcrest}"
// testCompile 'org.mockito:mockito-core:2.7.22'
// Spring Rest Docs
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
asciidoctor "org.springframework.restdocs:spring-restdocs-asciidoctor:${versions.springRestDocs}"
}
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}
test {
outputs.dir snippetsDir
}
asciidoctor {
attributes 'snippets': snippetsDir
inputs.dir snippetsDir
outputDir 'build/asciidoc'
dependsOn test
sourceDir 'src/main/asciidoc'
}
jar {
dependsOn asciidoctor
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
sourceSets {
generated {
java.srcDir "${buildDir}/generated/src/java/"
}
}
jpaModelgen {
library = "org.hibernate:hibernate-jpamodelgen:${versions.hibernate}"
jpaModelgenSourcesDir = "src/generated/java"
}
compileJava.options.compilerArgs += ["-proc:none"]