Open cthiebault opened 1 month ago
/cc @geoand (kotlin), @glefloch, @quarkusio/devtools
This is probably fixable, but I'll just say that what you are trying to do is completely untested and will likely never be officially supported.
This is probably fixable, but I'll just say that what you are trying to do is completely untested and will likely never be officially supported.
Thanks for your answer.
I've been using Quarkus with Gradle & Kotlin with success for 2 years now :-) Now that the projects become more complex, I need to extract common code to extensions... and I start to hit walls :-(
I thought as Quarkus supports Gradle and Kotlin that the extension would also work out of the box...
I thought as Quarkus supports Gradle and Kotlin that the extension would also work out of the box...
It does, but for writing applications, not extensions.
That said, I am pretty sure that this issue is solvable, but you are bound to run into more since this is completely uncharted territory.
@cthiebault We use Gradle + Kotlin for our applications, but we use Maven + Kotlin for our extensions. This combination has worked well for us.
You can find an example in the quarkiverse: https://github.com/quarkiverse/quarkus-mockk
@geoand The Quarkus documentation explicitly mentions Gradle extensions as supported (https://quarkus.io/guides/writing-extensions#using-gradle), so this seems a valid issue.
Edit: My fault, it mentions Gradle but not Kotlin.
@cthiebault If you want I can provide a template for an extension with Maven + Kotlin.
@mschorsch right, that combination is totally untested AFAIk
@mschorsch i think it'd be great
Here is an example of a Quarkus extension with Maven+Kotlin based on the standard example “Greeting extension”: quarkus-extension-kotlin-maven-skeleton.zip
Hope this helps.
Thanks your help :)
I'm working on an AWS Rest Lambda application using Gradle+Kotlin.
As we cannot mix quarkus-amazon-lambda-rest
with other non-REST lambda (like SQS), I'm splitting my application into 2 differents Quarkus applications with the common code as an extension:
app-lambda-rest
app-lambda
(for non-REST lambdas)common-runtime
common-deployment
I was hoping to be able to use a single Gradle project with 4 sub-projects... Using Maven for the extension and Gradle for the apps will complexify things. I may switch to Maven for this project. I'll have a look to your skeleton! Thanks again @mschorsch!
Describe the bug
I'm trying to create a very simple Quarkus Extension using Gradle and Kotlin.
The extension is basic and just offer a CDI bean.
Building the project, I get a
It works when I use Gradle + Java but not with Gradle + Kotlin.
How to Reproduce?
I've created a sample repo to reproduce the error: https://github.com/cthiebault/quarkus-gradle-kotlin-extension
branch gradle-kotlin (Gradle + Kotlin) fails with the following error:
Output of
java -version
21.0.2
Quarkus version or git rev
3.11.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.6