Update document on gradle-apt-plugin

This commit is contained in:
tomoya-yokota 2018-06-11 20:12:04 +09:00 committed by sjaakd
parent b03ca8b7a9
commit e2c8559a62
2 changed files with 20 additions and 5 deletions

View File

@ -123,13 +123,21 @@ Add the following to your Gradle build file in order to enable MapStruct:
...
plugins {
...
id 'net.ltgt.apt' version '0.8'
id 'net.ltgt.apt' version '0.15'
}
// You can integrate with your IDEs.
// See more details: https://github.com/tbroyer/gradle-apt-plugin#usage-with-ides
apply plugin: 'net.ltgt.apt-idea'
apply plugin: 'net.ltgt.apt-eclipse'
dependencies {
...
compile 'org.mapstruct:mapstruct-jdk8:{mapstructVersion}'
compile "org.mapstruct:mapstruct-jdk8:${mapstructVersion}"
apt 'org.mapstruct:mapstruct-processor:{mapstructVersion}'
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
// If you are using mapstruct in test code
testAnnotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
}
...
----

View File

@ -105,13 +105,20 @@ For Gradle, you need something along the following lines:
```groovy
plugins {
...
id 'net.ltgt.apt' version '0.8'
id 'net.ltgt.apt' version '0.15'
}
// You can integrate with your IDEs.
// See more details: https://github.com/tbroyer/gradle-apt-plugin#usage-with-ides
apply plugin: 'net.ltgt.apt-idea'
apply plugin: 'net.ltgt.apt-eclipse'
dependencies {
...
compile 'org.mapstruct:mapstruct:1.2.0.Final' // OR use this with Java 8 and beyond: org.mapstruct:mapstruct-jdk8:...
apt 'org.mapstruct:mapstruct-processor:1.2.0.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.2.0.Final'
testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.2.0.Final' // if you are using mapstruct in test code
}
...
```