Hi,

You should be able to add kotlin code same way as Java code, however you need 
some changes to the Gradle configs. I added a template of build.gradle that can 
use Kotlin under https://bugreports.qt.io/browse/QTBUG-86894, you can use that, 
I used that with a simple Qt app that uses Java and kotlin, that should at some 
point be part of the default gradle file or documented somewhere.

Best regards,
Assam

From: Interest <interest-boun...@qt-project.org>
Date: Friday, January 8, 2021 at 6:27 PM
To: Alexander Dyagilev <alervd...@gmail.com>, interest@qt-project.org 
<interest@qt-project.org>
Subject: Re: [Interest] Android: use Kotlin alongside with Java?
On 1/8/21 11:20 AM, Kyle Edwards wrote:
> Yes, you can put it in with your Java source.
>
> If you're using Gradle, you may need to import a Kotlin plugin (if
> there is one).

I will also add this: Kotlin is very well-supported in Android, and in
fact has become the recommended primary language for Android
development. The Android documentation would probably be a better guide
than the Qt documentation.

Kyle

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to