mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#2346 Update documentation and readme about MapStruct and Gradle
Remove obsolete net.ltgt.apt Use com.diffplug.eclipse.apt for Eclipse IntelliJ works transparently
This commit is contained in:
parent
0d8bbacc53
commit
08af258533
@ -76,7 +76,7 @@ It will not work with older versions.
|
||||
|
||||
Add the following to your Gradle build file in order to enable MapStruct:
|
||||
|
||||
.Gradle configuration (3.4 and later)
|
||||
.Gradle configuration
|
||||
====
|
||||
[source, groovy, linenums]
|
||||
[subs="verbatim,attributes"]
|
||||
@ -84,14 +84,9 @@ Add the following to your Gradle build file in order to enable MapStruct:
|
||||
...
|
||||
plugins {
|
||||
...
|
||||
id 'net.ltgt.apt' version '0.20'
|
||||
id "com.diffplug.eclipse.apt" version "3.26.0" // Only for Eclipse
|
||||
}
|
||||
|
||||
// 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 {
|
||||
...
|
||||
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
|
||||
@ -103,33 +98,6 @@ dependencies {
|
||||
...
|
||||
----
|
||||
====
|
||||
.Gradle (3.3 and older)
|
||||
====
|
||||
[source, groovy, linenums]
|
||||
[subs="verbatim,attributes"]
|
||||
----
|
||||
...
|
||||
plugins {
|
||||
...
|
||||
id 'net.ltgt.apt' version '0.20'
|
||||
}
|
||||
|
||||
// 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:${mapstructVersion}"
|
||||
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
|
||||
|
||||
// If you are using mapstruct in test code
|
||||
testAnnotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
|
||||
}
|
||||
...
|
||||
----
|
||||
====
|
||||
|
||||
You can find a complete example in the https://github.com/mapstruct/mapstruct-examples/tree/master/mapstruct-on-gradle[mapstruct-examples] project on GitHub.
|
||||
|
||||
|
@ -109,14 +109,9 @@ For Gradle, you need something along the following lines:
|
||||
```groovy
|
||||
plugins {
|
||||
...
|
||||
id 'net.ltgt.apt' version '0.15'
|
||||
id "com.diffplug.eclipse.apt" version "3.26.0" // Only for Eclipse
|
||||
}
|
||||
|
||||
// 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.4.1.Final'
|
||||
|
Loading…
x
Reference in New Issue
Block a user