这是GRADLE用户的语法(maven用户请看看其他答案)
这会将龙目岛正确添加到您的项目中,然后配置jpa处理器
plugins {
...
id 'io.franzbecker.gradle-lombok' version '1.7'
}
project.afterEvaluate {
project.tasks.compileQuerydsl.options.compilerArgs = [
"-proc:only",
"-processor", project.querydsl.processors() +
',lombok.launch.AnnotationProcessorHider$AnnotationProcessor'
]
}
这是QueryDSL和Lombok的工作版本。依赖项由插件导入,因此不需要声明依赖项:
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'io.franzbecker.gradle-lombok' version '1.7'
id "com.ewerk.gradle.plugins.querydsl" version "1.0.9"
}
querydsl {
jpa = true
}
// plugin needed so that the
project.afterEvaluate {
project.tasks.compileQuerydsl.options.compilerArgs = [
"-proc:only",
"-processor", project.querydsl.processors() +
',lombok.launch.AnnotationProcessorHider$AnnotationProcessor'
]
}
dependencies {
compile group: 'com.querydsl', name: 'querydsl-jpa', version: '4.1.3'
}