mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#1695 update gradle installation
This commit is contained in:
parent
73a1ab1e8a
commit
abd1cfb6a1
@ -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}"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user