New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle working example #357
Comments
Hey there, only add annotationProcessor in gradle [versions]
queryDsl = "6.1"
[libraries]
#QueryDSL
queryDSLBom = { group = "io.github.openfeign.querydsl", name = "querydsl-bom", version.ref = "queryDsl" }
queryDslJPA = { group = "io.github.openfeign.querydsl", name = "querydsl-jpa", version.ref = "queryDsl" }
queryDslApt = { group = "io.github.openfeign.querydsl", name = "querydsl-apt", version.ref = "queryDsl" }
queryDslSpatial = { group = "io.github.openfeign.querydsl", name = "querydsl-spatial", version.ref = "queryDsl" }
queryDslGuava = { group = "io.github.openfeign.querydsl", name = "querydsl-guava", version.ref = "queryDsl" }
queryDslCollection = { group = "io.github.openfeign.querydsl", name = "querydsl-collections", version.ref = "queryDsl" }
queryDslCore = { group = "io.github.openfeign.querydsl", name = "querydsl-core", version.ref = "queryDsl" }
queryDslSql = { group = "io.github.openfeign.querydsl", name = "querydsl-sql", version.ref = "queryDsl" }
queryDslSqlCodeGen = { group = "io.github.openfeign.querydsl", name = "querydsl-codegen", version.ref = "queryDsl" } compileOnly("io.github.openfeign.querydsl:querydsl-apt:${libs.versions.queryDsl.get()}:jpa")
implementation(libs.queryDslJPA)
annotationProcessor("io.github.openfeign.querydsl:querydsl-apt:${libs.versions.queryDsl.get()}:jpa")
implementation(libs.queryDslCore)
implementation(libs.queryDslGuava)
implementation(libs.queryDslCollection)
implementation(libs.queryDslSpatial)
annotationProcessor(libs.jakartaPersistence) |
@fab918 we need to create a gradle plugin for querydsl. But I never got to make one. If you keen on making it happen, I'm more than happy to review and advise. This might be a good inspiration |
@DaiYuANg It doesn't work, nothing happens when I run a build with gradle, normally the classes should be generated. I tried :
I've tried the suggested configuration here querydsl/querydsl#3655, in the same way, nothing happens when I build. I tested with java 17 and 21.
@velo Why should we need a plugin to use the library on Gradle? |
@fab918 ... I am using:
Note: the latest version 9.0.7 is not compatible, but I've created a PR to move all dependencies from "com.querydsl:" to "io.github.openfeign.querydsl:" infobip/infobip-spring-data-querydsl#101. |
Hello,
I spent a few hours trying to get a project running with this version of QueryDSL. My project basically works with queryDsl v4. I'd like to update it, but I've tried everything I can't found on the Internet but and I can't get my Q classes generated with V5 and grandle. The examples on the repo are in Maven only unfortunately.
Is it possible to get help to have a minimal project that generates Q classes with Gradle?
I think it will help other people. Thanks for everything!
The text was updated successfully, but these errors were encountered: