michaelmosmann / nebula-kotlin-plugin

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
  • Bundles the kotlin-allopen and kotlin-noarg plugins to allow them to be applied without adding them manually to the classpath

Quick Start

Refer to the Gradle Plugin Portal for instructions on how to apply the main plugin.

Basic Build

The plugin simplifies a basic Kotlin build script to:

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

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

Additional library

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

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.3.41).

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

About

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

License:Apache License 2.0


Languages

Language:Groovy 54.4%Language:Kotlin 29.4%Language:Shell 16.2%