@bamboo bamboo released this Jul 19, 2016 · 265 commits to master since this release

General Notes

Gradle Script Kotlin v0.3.0 significantly improves the support for Kotlin based projects and it is expected to be included in the upcoming Gradle 3.0 RC1.

The features in this release are also available for immediate use within the latest Gradle Script Kotlin distribution nightly. To use it, upgrade your Gradle wrapper in the following fashion:

$ gradle wrapper --gradle-distribution-url

Updates since v0.2.1

  • Upgrade to Kotlin 1.1-M01 (#98). The embedded Kotlin compiler was upgraded to the recently released Kotlin 1.1-M01 bringing more language features and a better IDE experience.

  • Kotlin based plugins (#84). A number of issues preventing Kotlin based plugins to be configured from Kotlin based builds have been fixed. Note that the build script will be executed against the version of the Kotlin runtime found in the script classpath which might be older or newer than the one embedded in gradle-script-kotlin.

  • Kotlin based buildSrc (#86). Kotlin can now be used as an implementation language in buildSrc. The extensions RepositoryHandler.gradleScriptKotlin and DependencyHandler.kotlinModule were introduced to ease the process. A proper sample will be coming soon, in the meantime please refer to this test case.

  • Types defined in buildSrc are visible to IDEA (#92). Types defined in buildSrc will now be recognised by IDEA and content-assist will work. Source navigation support is under way.

  • Groovy Closure interoperability helpers (#103). To help in dealing with Groovy specific APIs, the helpers closureOf and KotlinClosure were introduced. This is how a script can react to the buildFinished event, for instance:

     gradle.buildFinished(closureOf<BuildResult> {
         println("$action finished") // $action refers to BuildResult.getAction()