Delombok using Gradle

前端 未结 3 884
闹比i
闹比i 2021-01-04 02:06

As part of our build process we analyse our source code with SonarQube.

One problem with this is that we use Lombok annotations and SonarQube is not handling this ve

3条回答
  •  孤街浪徒
    2021-01-04 02:47

    I think the easiest way to delombok sources with gradle is:

    task delombok {
        description 'Delomboks the source code'
        ant.taskdef(classname: 'lombok.delombok.ant.Tasks$Delombok', classpath: configurations.compile.asPath,  name: 'delombok')
        ant.mkdir(dir: 'build/src-delomboked') 
        ant.delombok(verbose: 'true', encoding: 'UTF-8', to: 'build/src-delomboked', from: 'src/main/java')
    }
    

提交回复
热议问题