From abd1cfb6a18cf13a055f2ea9d4c6fc6118129779 Mon Sep 17 00:00:00 2001 From: Andres Jose Sebastian Rincon Gonzalez Date: Tue, 22 Jan 2019 16:49:30 -0500 Subject: [PATCH] #1695 update gradle installation --- .../mapstruct-reference-guide.asciidoc | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc index d371e310b..782e47a31 100644 --- a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc +++ b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc @@ -115,7 +115,7 @@ It will not work with older versions. Add the following to your Gradle build file in order to enable MapStruct: -.Gradle configuration +.Gradle configuration (3.4 and later) ==== [source, groovy, linenums] [subs="verbatim,attributes"] @@ -123,7 +123,34 @@ Add the following to your Gradle build file in order to enable MapStruct: ... plugins { ... - id 'net.ltgt.apt' version '0.15' + 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 { + ... + implementation "org.mapstruct:mapstruct:${mapstructVersion}" + annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}" + + // If you are using mapstruct in test code + testAnnotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}" +} +... +---- +==== +.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. @@ -134,8 +161,8 @@ 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}" }