quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.82k stars 2.69k forks source link

Document recommended Kotlin version #26093

Closed knutwannheden closed 2 years ago

knutwannheden commented 2 years ago

Description

The Quarkus BOM contains a Kotlin version (currently 1.6.21) which is also used for quite a few managed Kotlin dependencies. I suppose this is also the recommended Kotlin version to use when developing a Kotlin-based Quarkus app. I think it would make sense to mention this prominently in the Kotlin guide and possibly also mention how to properly use a different version of Kotlin (with regards to the order of BOMs).

Implementation ideas

No response

quarkus-bot[bot] commented 2 years ago

/cc @evanchooly

geoand commented 2 years ago

Good idea!

Would you like to take a shot at implementing this?

knutwannheden commented 2 years ago

I will make a PR with a basis for discussion.

knutwannheden commented 2 years ago

@geoand Writing this makes me wonder if it wouldn't make sense for the Quarkus BOM to include the Kotlin BOM org.jetbrains.kotlin:kotlin-bom. Thoughts?

geoand commented 2 years ago

That depends on what the BOM includes. If it only includes Kotlin stuff, then I think it's a good idea.

cc @gsmet

gsmet commented 2 years ago

AFAICS, the BOM is clean. Not sure it contains things we want that we don't have already.

knutwannheden commented 2 years ago

I am thinking it might include dependencies which the application developer may want (e.g. kotlin-test-junit5), and having the Quarkus BOM already provide the "correct" version, would be nice, IMHO.

gsmet commented 2 years ago

If it makes sense, we can do it. Can you take care of it?

knutwannheden commented 2 years ago

@gsmet I will make it part of the PR.

u6f6o commented 1 year ago

Hi @knutwannheden ,

Sorry for replying to this issue after it has been closed but this topic covers a problem I am currently facing. I also asked my question in the quarkus chat..

Is there any way to refer to the kotlin version suggested by the quarkus-bom in my build.gradle files plugin section?

It currently looks like this:


plugins {
    id 'io.quarkus'

    id 'org.jetbrains.kotlin.jvm' version "1.8.0"
    id "org.jetbrains.kotlin.plugin.allopen" version "1.8.0"
    id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0'
}

We've been facing an issue lately as our renovate bot updated the kotlin version to the latest version and the quarkus version we were using in this project was not compatible with it. Thus I was wondering, if the quarkus gradle plugin maybe offers some mechanics to pick the right kotlin version automatically?

knutwannheden commented 1 year ago

No idea about that, sorry. I suspect you will have to keep them in sync manually.