Ending of an adventure?

Ending of an adventure?

2020, Aug 30    


Brief Introduction to the Project:

The Debian Android Tools team is working towards the goal of having the entire Android toolchain and SDK in Debian. It provides the developer with the functionality to build an app with the help of easy-to-use packages. This project is a part of The Debian Android Tools teams which maintains almost 60 packages with conjugation with The Debian Java team. The main objectives of the project are:

  1. Package kotlin and help to upload it to the Debian Archive.

  2. Package the latest Android Target Platform Framework and improve other sdk-tools along with Gradle build system.

Since kotlin was the root blocker to everything and almost all the work was stuck. I focused my project on packaging the whole kotlin language source.

What all I did in the summer?

I’ll give a brief overview of the work (will try to make it less bland) I did in the past four months.

I’m not going to lie, but the statement “Time flies fast!” is one hundred percent true. I started working early from the community bonding days itself and have come a long way.

Since kotlin was one of the major root blockers for every package we had in android and many packages of java (including the Gradle build system itself), I finally took a step forward to get kotlin packaged for Debian archives.

I didn’t know that packaging + bootstrapping a language will result in learning many things. From rectifying the issues in the kotlin compiler to resolve various circular dependencies and version conflicts, I think we are very near to get kotlin packaged. The upload plan for kotlin is intact and we plan “Kotlin to build from itself”.

For the very same reason, the first upload will be along with the kotlin-bootstrap and kotlin source package. The second upload that would be source-only upload, should be able to build from the kotlin binaries generated by the first upload (hence, removing the kotlin-bootstrap package). Let’s see how it will go. I’ll be contributing to the team and to the kotlin work after GSoC as well.

For detailed work logs, I have been sending weekly reports and writing daily logs (to keep a self-track of everything). Here, are the references for all Weeks Reports [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].

The repositories for kotlin work can be found at:

=> [samyak-jn/kotlin]: This is the official repo where all the changes are pushed after proper verification and proper license.

=> [samyak-jn/kotlin-1.3.30]: This is the debugging repo, which is a fork from the m36 account from last year. Here all the changes are directly made to the source (helps for a quick debugging and testing).

Kotlin Work:

All the following work can be found in the form of d/patches at kotlin repo.`

=> Convert the following file from kotlin DSL to Groovy build files:

  • kotlin-native
  • kotlin-compiler-runner
  • kotlin-scripting-embeddable
  • kotlin-android-extensions
  • kotlin-gradle-plugin
  • kotlin-gradle-plugin-api
  • kotlin-gradle-plugin-model
  • kotlin-annotation-*
  • kotlinx-metadata

=> Fixed errors in kotlin-compiler-embeddable and wrote custom functions for kotlin closure to make it work with groovy standards.

=> Corrected compiler-runner issues and fixed runtime dependencies.

=> Worked on circular dependencies for following:

  • kotlin-compiler-embeddable
  • kotlin-gradle-plugin
  • android-gradle-plugin
  • gradle
  • And, many sub dependencies from the src itself but it got fixed with a simple groovy specific method.

=> Backported following files to Gradle and andrewsh helped to upload it to unstable (v4.4.1-12):

  • ComponentWithCoordinates
  • DependencyConstraint
  • CommandLineArgumentProvider
  • FeaturePreviews
  • TaskProvider
  • NamedDomainObjectProvider
  • Capabilities

All the above changes can be found at Gradle repo at debian-java team.

=> Tested various versions of kotlin [v1.2.3, v1.2.4, v1.3.0, and v1.3.30] and gradle [v4.x, and v.5.0] to package the optimal solution.
=> Wrote proper kotlin copyright for 18096 directories, or(89156 files).
=> Wrote a wiki for Kotlin work.
=> Wrote an update for Kotlin status in the initial coding period.
=> For ease and quick reference wrote a README that depicts the basic conversion of DSL ~> Groovy.
=> Tested the kotlin-compiler and kotlin.deb functionality (needs plugins jars).

Other than the Kotlin work:

=> Packages that are uploaded to NEW:

=> libjline-guava (regression with Java8 [uploaded by ebourg])
=> Fixed android-platform-system-tools-hidl (Closes: #959904)
=> Fixed android-platform-tools-apksig (Closes: #960778)
=> Updated android-platform-dalvik (Not yet merged because of other android package which needs kotlin and gradle so we can have a proper tag sync.
=> Built and setup an AOSP container
=> WIP: website for Android-Tools Team

Apart from all, what’s the final status of Kotlin right now?

The kotlin is almost done and is ready for its first experimental upload which includes the bootstrap and by the next upload, we expect kotlin to build from itself.

Currently, I’m left with the last circular dependency for kotlin-Gradle-plugin (which needs an upgraded version of Gradle itself). I could have backported those changes, but the backporting involves more than five files which include changing the original methods, which isn’t feasible, as it might break stuff. I will probably write a custom method for it, once done with drafting the final report and waiting for DebConf’20 to finish.

Once resolved, we can upload Kotlin soon :D

Apart from the project, I finally attended MiniDebConf and DebConf this year. It was virtual, but it is always nice to meet and talk to people. I hope this fiasco gets over soon. So we can finally meet at Haifa ( where next DebConf is supposed to happen) :)

And little me chaired for Android Tools Team BoF as well as I presented my GSoC’20 project at the DebConf as a Debian outreach student.

I hope to do better next time, who knows maybe I get a chance to be a DM/DD? ;)

As Jonathan (our very own DPL) said, “you need an odd combination of patience and a sense of urgency in order to be successful in Debian”. Let’s hope for the best! <3

Could I be more thankful?

As I always mention, Debian is not just a community for me; it’s more like a family. I never say this enough, but I have learned a lot, whether it’s technical or non-tech.

I would like to thank my mentors Hans, Andrewsh, Chirayu, Ebourg, Saif, Seamlik for their never-ending support and help. From day one till now, I have learned a lot from them. Thanks for correcting me and the fast acknowledgment of everything.

This project had three students this year, I’m thankful to both Raman and Manas for the coordination!

As they say, we should not forget the origin, I would like to give my vote of thanks to Pirate Praveen and Utkarsh for helping me out in my initial days of contributing to Debian.

On the very same account, I am also thankful to people who helped me in one way or another. Lastly, I would like to thank my family for handling all my mood swings ;)

Oh well, I’m going to miss this summer and the people of course. :/

You can always find me at:

All the kotlin, Gradle, and android package related discussions are at #debian-android-tools team on OFTC. Please join us!