Features of Kotlin Kobalt
The Kobalt Android plug-in offers the following features:
- Automatic SDK downloading
- Resource merging
- Manifest merging
- Predexing
- Generation of apk files
- Install and run activities on the device
Stay update with : Whats new features in Kotlin 1.1.2 version
It also supports features already offered by Kobalt itself:
Clean, minimal syntax for build files
Cobalt wants to score with its minimalistic syntax with developers. This provides for clear code without boilerplate, which should show the following example of a JCommander build file:
import com.beust.kobalt.* import com.beust.kobalt.plugin.java.* import com.beust.kobalt.plugin.packaging.* import com.beust.kobalt.plugin.publish.* val jcommander = project { name = "jcommander" group = "com.beust" artifactId = name version = "1.52" dependenciesTest { compile("org.testng:testng:") } assemble { mavenJars { } } bintray { publish = false } }
This build file also includes a directive to upload your artifacts to Bintray automatically.
Build file auto-completion in your IDE
Another feature of the tool is the auto-completion build file in the IDE. Since Kobalt’s build files are actual Kotlin files, not only can you leverage auto-completion to write your build files but the full power of your IDEA is at your fingertips to write these files in any way you see fit: using expressions, conditionals, classes, extension functions, constants… The sky is the limit!
Cobalt uses the Kotlin ‘s built – in Builder Pattern to offer a DSL, which is similar to Gradle, as well as minimalist.
Here is an example of the auto-completion dialog:
And see the following section to get a feel for Kobalt’s build file syntax.
Incremental tasks
Most CoreTasks are incremental, so they are skipped when called, but nothing has changed since the last time. In addition, Version 1.0 supports incremental Kotlin compilation by the Kotlin compiler.
The support for incremental tasks is also trivial to add for plug-in developers, which guarantees that your builds with Kobalt will always be as fast as they can be.
Recommended : Disadvantage of Kotlin – You must know before use
Intuitive plug-in architecture
Kobalt’s plug-in architecture is heavily inspired from other successful plug-in architectures such as Eclipse and IDEA. Thanks to Kotlin’s static type safety, writing plug-ins for Kobalt is both flexible and intuitive, with a minimum of boiler plate.
See the official site for more information.
Hope you love this concept and article!!!
Share your thoughts