mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Update document on gradle-apt-plugin
This commit is contained in:
parent
b03ca8b7a9
commit
e2c8559a62
@ -123,13 +123,21 @@ Add the following to your Gradle build file in order to enable MapStruct:
|
|||||||
...
|
...
|
||||||
plugins {
|
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 {
|
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}"
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
----
|
----
|
||||||
|
11
readme.md
11
readme.md
@ -105,13 +105,20 @@ For Gradle, you need something along the following lines:
|
|||||||
```groovy
|
```groovy
|
||||||
plugins {
|
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 {
|
dependencies {
|
||||||
...
|
...
|
||||||
compile 'org.mapstruct:mapstruct:1.2.0.Final' // OR use this with Java 8 and beyond: org.mapstruct:mapstruct-jdk8:...
|
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
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user