From 08af258533c6f949de8b0e1a71fb79beab895b5a Mon Sep 17 00:00:00 2001 From: Filip Hrisafov Date: Sat, 30 Jan 2021 10:35:04 +0100 Subject: [PATCH] #2346 Update documentation and readme about MapStruct and Gradle Remove obsolete net.ltgt.apt Use com.diffplug.eclipse.apt for Eclipse IntelliJ works transparently --- .../main/asciidoc/chapter-2-set-up.asciidoc | 36 ++----------------- readme.md | 7 +--- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc b/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc index cb0067f2f..76626f44c 100644 --- a/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc +++ b/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc @@ -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. diff --git a/readme.md b/readme.md index c39a408ac..45eeda27e 100644 --- a/readme.md +++ b/readme.md @@ -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'