I\'m trying to set up a Gradle build script for a new project. That project will use JPA 2 along with Querydsl.
On the following page of Querydsl\'s reference docume
With Gradle 1.3 and newer (older not tested) you can use Querydsl APT like this:
configurations {
javacApt
}
dependencies {
javacApt 'com.mysema.querydsl:querydsl-apt:3.3.0'
}
compileJava {
options.compilerArgs <<
'-processorpath' << (configurations.compile + configurations.javacApt).asPath <<
'-processor' << 'com.mysema.query.apt.jpa.JPAAnnotationProcessor'
}
These compiler args are passed directly to javac.
To use with groovy compiler replace compileJava with compileGroovy.