A lot of work has gone into Kobalt since I announced its alpha:
- New plug-in architecture.
- Various plug-ins.
- An IDEA plug-in to synchronize your build files.
- Expanding the DSL.
- … and much more!
I’m plannning to post more detailed updates as things progress but today, I’d like to briefly show a major milestone: the first Android APK generated by Kobalt.
I picked the Code path intro app as a test application. I first built it with Gradle to get a feel for it and the apk was generated in about 27 seconds. Then I generated a Build.kt
file with ./kobaltw --init
, added a few Android related directives to reach the following (complete) build file:
import com.beust.kobalt.* import com.beust.kobalt.plugin.android.* import com.beust.kobalt.plugin.java.* val p = javaProject { name = "intro_android_demo" group = "com.example" artifactId = name version = "0.1" dependencies { compile("com.android.support:support-v4:aar:23.1", file("app/libs/android-async-http-1.4.3".jar)) } sourceDirectories { listOf(path("app/src/main/java")) } android { applicationId = name buildToolsVersion = "21.1.2" } }
Then I launched the build with ./kobaltw assemble
, and…
Less than five seconds to generate R.java
, compile it, compile the code, run aapt
, generate classes.dex
and finally, generated the apk
. If you are curious, you can check out the full log.
Admittedly, Kobalt doesn’t yet handle build types and flavors nor manifest merging, but the example app I’m building here doesn’t use those either so I don’t expect the build time to increase much. There is a lot more to be done before Kobalt’s Android plug-in is ready for more users, but this is a pretty encouraging result.