-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
92 lines (86 loc) · 2.55 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
buildscript {
ext {
springBootVersion = "2.0.1.RELEASE"
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.15"
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
}
}
apply plugin: 'java'
apply plugin: 'net.ltgt.apt'
apply plugin: 'net.ltgt.apt-eclipse'
apply plugin: 'net.ltgt.apt-idea'
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"
ext {
lombokVersion = '1.16.20'
mapstructVersion = '1.2.0.Final'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compileOnly("org.projectlombok:lombok:${lombokVersion}")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}")
compileOnly("org.mapstruct:mapstruct-jdk8:${mapstructVersion}")
compileOnly("org.mapstruct:mapstruct-processor:${mapstructVersion}")
annotationProcessor("org.mapstruct:mapstruct-processor:${mapstructVersion}")
testAnnotationProcessor("org.mapstruct:mapstruct-processor:${mapstructVersion}")
}
compileJava {
aptOptions.processorArgs += [
'mapstruct.suppressGeneratorTimestamp' : 'true',
'mapstruct.suppressGeneratorVersionInfoComment': 'true',
'mapstruct.defaultComponentModel' : 'spring'
]
}
//eclipse {
// jdt {
// apt {
// // whether annotation processing is enabled in Eclipse
// // (isAptEnabled in Kotlin)
// aptEnabled = compileJava.aptOptions.annotationProcessing
// // where Eclipse will output the generated sources; value is interpreted as per project.file()
// genSrcDir = file('.apt_generated')
// // whether annotation processing is enabled in the editor
// // (isReconcileEnabled in Kotlin)
// reconcileEnabled = true
// // a map of annotation processor options; a null value will pass the argument as -Akey rather than -Akey=value
// processorOptions = compileJava.aptOptions.processorArgs
//
// file {
// whenMerged { jdtApt ->
// // you can tinker with the JdtApt here
// }
//
// withProperties { properties ->
// // you can tinker with the Properties here
// }
// }
// }
// }
//
// factorypath {
// plusConfigurations = [ configurations.apt, configurations.testApt ]
// minusConfigurations = []
//
// file {
// whenMerged { factorypath ->
// // you can tinker with the Factorypath here
// }
//
// withXml { node ->
// // you can tinker with the Node here
// }
// }
// }
// }