Hello. I'm trying to use querydsl project so I'm u...
# kapt
a
Hello. I'm trying to use querydsl project so I'm using kapt to generate query api from my annotated entities. I'm using gradle and kotlin dsl for it. Usage looks like this:
Copy code
plugins {
    ...
    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
Copy code
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?