apomelov
11/23/2017, 6:58 AMplugins {
...
id("org.jetbrains.kotlin.kapt").version("1.1.60")
...
}
...
dependencies {
...
kapt("com.querydsl:querydsl-apt:4.1.4:jpa")
kapt("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final")
compile("com.querydsl", "querydsl-jpa", "4.1.4")
}
Everything seems to work except one thing: IDEA doesn't add a new source folder for it. So I can't use this code for further development. So I go and add it manually with
val generatedSources = buildDir.resolve("generated/source/kapt/main")
java {
sourceSets["main"].java.srcDir(generatedSources)
}
But this changes nothing. Probably I'm wrong when trying to attached these generated sources because they are being generated during compilation. Probably the right way is to make separate subproject for Entities and this generation.
Could anybody please comment?