Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 2 additions & 34 deletions documentation/src/main/asciidoc/chapter-2-set-up.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,17 @@ 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"]
----
...
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}"
Expand All @@ -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.

Expand Down
7 changes: 1 addition & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down