Skip to content

Provides the Kotlin plugin via the Gradle plugin portal, automatically depends on the standard library, and allows Kotlin library versions to be omitted

License

Notifications You must be signed in to change notification settings

LtTempletonPeck/nebula-kotlin-plugin

 
 

Repository files navigation

Nebula Kotlin Plugin

Support Status Build Status Coverage Status Gitter Apache 2.0

Provides the Kotlin plugin via the Gradle plugin portal, and adds ergonomic improvements over the default plugin:

  • Automatically depends on the standard library
  • Allows Kotlin library versions to be omitted, inferring them automatically from the plugin version
  • For Kotlin 1.1 and later, sets the -jvm-target and uses the jre standard library based on the sourceCompatibility

Basic Build

The plugin simplifies a basic Kotlin build script to:

plugins {
    id 'nebula.kotlin' version '1.1.4'
} 

repositories {
    mavenCentral() // or jcenter()
}

Additional library

plugins {
    id 'nebula.kotlin' version '1.1.4'
}

repositories {
    mavenCentral() // or jcenter()
}

dependencies {
    compile 'org.jetbrains.kotlin:kotlin-reflect'
}

The version for kotlin-reflect will be automatically set to match the Kotlin version (1.1.4).

Caveats

  • IntelliJ doesn't set the -jvm-target compiler option based on the Java SDK setting for the project, and can cause the compiler inlining failure if it tries to inline classes compiled with Gradle. Configure the JVM target in IntelliJ preferences to avoid this

EAP releases

EAP plugin versions are also available, but require the bintray repository for the Kotlin Gradle plugin dependencies to resolve. For example, for the 1.1 EAP on On Gradle 2.14 and later, use:

pluginRepositories {
    maven {
        url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1'
    }
    gradlePluginPortal()
}

On earlier releases:

buildscript {
    repositories.maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' }
}

The plugin automatically adds the EAP repository for the build itself.

About

Provides the Kotlin plugin via the Gradle plugin portal, automatically depends on the standard library, and allows Kotlin library versions to be omitted

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 43.9%
  • Groovy 36.4%
  • Shell 19.7%