Created
September 27, 2018 09:47
-
-
Save OneYX/0988d95367171c7ef56e7baf91625903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
... | |
} | |
repositories { | |
mavenCentral() | |
maven { url "https://plugins.gradle.org/m2/" } | |
} | |
dependencies { | |
... | |
classpath("io.franzbecker:gradle-lombok:1.8") | |
} | |
} | |
apply plugin: ... | |
apply plugin: 'io.franzbecker.gradle-lombok' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
... | |
compileOnly('org.projectlombok:lombok') | |
} | |
/**** QueryDSL Class Generate Script ****/ | |
def queryDslOutput = file("src/main/generated") | |
sourceSets { | |
main { | |
java { | |
srcDir queryDslOutput | |
} | |
} | |
} | |
task generateQueryDSL(type: JavaCompile, group: 'build') { | |
source = sourceSets.main.java | |
classpath = configurations.compile | |
destinationDir = queryDslOutput | |
options.compilerArgs = [ | |
"-proc:only", | |
/********************* 핵심 포인트! *********************/ | |
"-processor", 'com.querydsl.apt.jpa.JPAAnnotationProcessor,lombok.launch.AnnotationProcessorHider$AnnotationProcessor' | |
] | |
} | |
compileJava.dependsOn(generateQueryDSL) | |
clean { | |
delete queryDslOutput | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment