From e2c8559a6294906bcbd24d3f7d5d01f04bf7f5c2 Mon Sep 17 00:00:00 2001 From: tomoya-yokota Date: Mon, 11 Jun 2018 20:12:04 +0900 Subject: [PATCH] Update document on gradle-apt-plugin --- .../asciidoc/mapstruct-reference-guide.asciidoc | 14 +++++++++++--- readme.md | 11 +++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc index 0647880e1..c79eb6efd 100644 --- a/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc +++ b/documentation/src/main/asciidoc/mapstruct-reference-guide.asciidoc @@ -123,13 +123,21 @@ Add the following to your Gradle build file in order to enable MapStruct: ... 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 { ... - 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}" } ... ---- diff --git a/readme.md b/readme.md index 1b65d8c68..9e5d354e5 100644 --- a/readme.md +++ b/readme.md @@ -105,13 +105,20 @@ For Gradle, you need something along the following lines: ```groovy 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 { ... 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 } ... ```