Skip to content

Commit 968c500

Browse files
committed
Removed mapstruct gradle script in lieu of apt plugin
1 parent caee877 commit 968c500

File tree

3 files changed

+27
-62
lines changed

3 files changed

+27
-62
lines changed

gradle/mapstruct.gradle

Lines changed: 0 additions & 60 deletions
This file was deleted.

springfox-swagger1/build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
apply from: "$rootDir/gradle/mapstruct.gradle"
1+
plugins {
2+
id "net.ltgt.apt" version "0.6"
3+
}
24

35
ext {
46
limits = [
@@ -24,11 +26,21 @@ dependencies {
2426
provided libs.springProvided
2527
provided libs.clientProvided
2628

29+
compile 'org.mapstruct:mapstruct:1.0.0.Final'
30+
apt 'org.mapstruct:mapstruct-processor:1.0.0.Final'
31+
2732
testCompile project(':springfox-core')
2833
testCompile project(':springfox-core').sourceSets.test.output
2934
testCompile project(':springfox-schema').sourceSets.test.output
3035
testCompile project(':springfox-swagger-common').sourceSets.test.output
3136
testCompile project(':springfox-spring-web').sourceSets.test.output
3237
testCompile libs.test
3338

39+
}
40+
41+
compileJava {
42+
options.compilerArgs += [
43+
"-Amapstruct.defaultComponentModel=spring",
44+
"-Amapstruct.unmappedTargetPolicy=ERROR"
45+
]
3446
}

springfox-swagger2/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
apply from: "$rootDir/gradle/mapstruct.gradle"
1+
plugins {
2+
id "net.ltgt.apt" version "0.6"
3+
}
24

35
ext {
46
limits = [
@@ -23,11 +25,22 @@ dependencies {
2325
provided libs.springProvided
2426
provided libs.clientProvided
2527

28+
compile 'org.mapstruct:mapstruct:1.0.0.Final'
29+
apt 'org.mapstruct:mapstruct-processor:1.0.0.Final'
30+
2631
testCompile project(':springfox-core')
2732
testCompile project(':springfox-core').sourceSets.test.output
2833
testCompile project(':springfox-schema').sourceSets.test.output
2934
testCompile project(':springfox-swagger-common').sourceSets.test.output
3035
testCompile project(':springfox-spring-web').sourceSets.test.output
3136

3237
testCompile libs.test
38+
}
39+
40+
41+
compileJava {
42+
options.compilerArgs += [
43+
"-Amapstruct.defaultComponentModel=spring",
44+
"-Amapstruct.unmappedTargetPolicy=ERROR"
45+
]
3346
}

0 commit comments

Comments
 (0)