Kotlin

Kotlin is a statically-typed language developed by JetBrains. Compatible with Java, Kotlin has become a choice for developing Android applications. Android Studio comes with inbuilt support for Kotlin.

At the moment, Debian doesn’t ship a Kotlin compiler, which results in various tools depending on Kotlin also missing from Debian and its Derivatives. Packaging Kotlin 1.3.31 is currently work in progress.

Kotlin packaging is one of the major tasks for the project Android SDK tools in Debian under Google Summer of Code.

The RFP/ITP is at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892842 and the current package at https://salsa.debian.org/samyak-jn/kotlin

What needs to be done?

The ultimate goal is to build Kotlin from itself.

Initially, the idea was to build Kotlin from its bootstrap. Bootstrap is nothing but the support provided by the SDK manager which provides full distribution for its toolchains. The bootstrap bundle shipping binaries such as kotlin-compiler, Gradle 4.4 et al which is used to build kotlin.

In 2019, m36 and seamlik did a lot of work packaging the dependencies and building Kotlin. The kotlin-bootstrap can be found at https://salsa.debian.org/m36-guest/kotlin-bootstrap. The work continued in 2020.

What is the objective?

As per the discussion, the original plan is to make a non-free package containing the Kotlin binaries and use it to build Kotlin. But since Kotlin is architecture-independent and the first uploads must always upload the built binaries together, maybe we don't need to upload kotlin-bootstrap to Debian at all.

Kotlin bootstrap is just used to build the real Kotlin on our local machine. For that here is a little workflow, which will give a fair idea of how to build it locally!

Prioritizing the work

For Kotlin to build properly, we will have to refine its dependencies first if some of the packages are left, we need to package them on an urgent basis.

WIP: To list all the dependencies needed for Kotlin, along with their status (Needs Changes/Good to Go).

Dependencies for Kotlin

libtrove-intellij-java

Uploaded

proguard:6.0.3

Uploaded

libjna-platform-java

Uploaded

picocontainer-1.3

Uploaded

jengeleman:shadow:4.0.3

Uploaded

libjna-platform-java

Uploaded

JLine3

Uploaded

intellij-community-idea

Uploaded

kotlin-bootstrap

Not Needed (Just for first upload)

picocontainer-1.4

Uploaded as libpicocontainer1

io.javaslang:2.0.6

Debian's vavr works

intellij-core

WIP

Just for information, here are the binaries in intellij-community-idea:

libintellij-utils-java

libintellij-jps-model-java

libintellij-extensions-java

libintellij-platform-api-java

libintellij-platform-impl-java

libintellij-core-java

Part of the Java Team

Since Kotlin is a JVM language most of the time, and it requires lots of Java libs, it is part of the Java Team


All the real-time discussions are welcome at #debian-mobile on OFTC.