Mapstruct and gradle configuration problem in Intellij IDEA

I have a project using gradle, and mapstruct as one of the dependencies. Every time I tried to build a project, it failed. I think this is because Mapstruct will generate an impl class that gradle could not find. Can someone help me configure this in intellij IDEA?

thank

+4
source share
1 answer

It works for me

In intellij IDEA go to

File | Settings | Creation, Execution, Deployment | Construction tool | Gradle | Second place

/ IDE . : - https://www.jetbrains.com/idea/whatsnew/#v2016-3-gradle

build.gradle

buildscript {
    ...    
}
plugins {
    id 'net.ltgt.apt' version '0.9'
}

apply plugin: 'idea'
apply plugin: "net.ltgt.apt"

dependencies {
    ...
    compile 'org.mapstruct:mapstruct-jdk8:1.1.0.Final'
    apt 'org.mapstruct:mapstruct-processor:1.1.0.Final'
}

, /

+1

Source: https://habr.com/ru/post/1651226/


All Articles