Converting build files to Groovy; week 2 update

I spent the first two weeks on updating build files of Kotlin to groovy so that we can reduce the dependency on kotlin-dsl while packaging Kotlin.

task("dist") is the task that we call in order to build Kotlin 1.3.30 so it would be enough to translate and deal with only those subprojects which are involed in the "dist" task graph. I wrote this code here find out exactly which tasks from which subprojects are being called; the build files of these subprojects are also shown.

There was a total of about 83 subprojects involved in the build process, out of these about 67 had build files written in kotlin-dsl. During this week I translated about 40 of those build files, so only 27 more remain. I have also translated the root projects build file. My work could be seen here.

The build logic for the build files are written in Kotlin and placed in the $rootDir/buildSrc directory. Kotlin supports writing custom extension functions like fun String.customfunction() but groovy doesnt support this behaviour, so I had to introduce intermediate functions for these functions in the build logic so that these function can be invoked from within the groovy buildfiles.

I am also ignoring all publishing code logic also the test logics that look like it may take a lot of time to translate. However I translate test logics as long as they don’t take up much time. Once I finish with translating business mostly by next week I will go on ahead with trying to build the project with only the relevant subprojects as child projects.

Also one thing I noticed is that I forgot to mention the source of intellij-core and the version we need to package Kotlin. Here is the source of intellij-core 183.5153 which is the version we need. Here is a link to the work I have done so far. You can find me as m36 or m36[m] on #debian-mobile and #debian-java in OFTC.

I’ll try to maintain this blog and post the major updates weekly.

Tweet Share