Bye bye Gradle and Maven !! Say hello Kotlin Kobalt
Kotlin Kobalt is a clever and fast build tool . It is much simpler to use than the others you mention and still works with maven repos.
It is a build system inspired by Gradle and Maven. It reuses the best concepts from these two successful and popular build systems while adding a few modern features of its own. Kobalt is written entirely in Kotlin and its build files are valid Kotlin files as well.
Kotlin Kobalt : New born Superhero
Kotlin Kobalt : New born Superhero
Thanks to IDEA’s top notch support for Kotlin, writing Kobalt build files automatically benefits from auto completion and all the other features that you are used to when writing code with your IDE of choice.

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 withWhats 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:

Kotlin Kobalt auto-completion features
Kotlin Kobalt auto-completion features

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!!!

By Ponglang Petrung

Administrator and PJ at Kamibit Thailand, Android Developer at CodeGears Co., Ltd. and Android Developer, and iOS Application Developer at Appdever

Share your thoughts

Leave a Reply

Loading Facebook Comments ...
Loading Disqus Comments ...