de.tobiasroeser.mill.kotlin-api_2.13

Kotlin compiler support for mill

License

License

Categories

Categories

Kotlin Languages
GroupId

GroupId

de.tototec
ArtifactId

ArtifactId

de.tobiasroeser.mill.kotlin-api_2.13
Last Version

Last Version

0.1.0-6-aa8f84
Release Date

Release Date

Type

Type

jar
Description

Description

de.tobiasroeser.mill.kotlin-api_2.13
Kotlin compiler support for mill
Project URL

Project URL

https://github.com/lefou/mill-kotlin
Source Code Management

Source Code Management

https://github.com/lefou/mill-kotlin

Download de.tobiasroeser.mill.kotlin-api_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/de.tototec/de.tobiasroeser.mill.kotlin-api_2.13/ -->
<dependency>
    <groupId>de.tototec</groupId>
    <artifactId>de.tobiasroeser.mill.kotlin-api_2.13</artifactId>
    <version>0.1.0-6-aa8f84</version>
</dependency>
// https://jarcasting.com/artifacts/de.tototec/de.tobiasroeser.mill.kotlin-api_2.13/
implementation 'de.tototec:de.tobiasroeser.mill.kotlin-api_2.13:0.1.0-6-aa8f84'
// https://jarcasting.com/artifacts/de.tototec/de.tobiasroeser.mill.kotlin-api_2.13/
implementation ("de.tototec:de.tobiasroeser.mill.kotlin-api_2.13:0.1.0-6-aa8f84")
'de.tototec:de.tobiasroeser.mill.kotlin-api_2.13:jar:0.1.0-6-aa8f84'
<dependency org="de.tototec" name="de.tobiasroeser.mill.kotlin-api_2.13" rev="0.1.0-6-aa8f84">
  <artifact name="de.tobiasroeser.mill.kotlin-api_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.tototec', module='de.tobiasroeser.mill.kotlin-api_2.13', version='0.1.0-6-aa8f84')
)
libraryDependencies += "de.tototec" % "de.tobiasroeser.mill.kotlin-api_2.13" % "0.1.0-6-aa8f84"
[de.tototec/de.tobiasroeser.mill.kotlin-api_2.13 "0.1.0-6-aa8f84"]

Dependencies

provided (2)

Group / Artifact Type Version
com.lihaoyi : mill-main-api_2.13 jar 0.7.0
com.lihaoyi : os-lib_2.13 jar 0.6.3

Project Modules

There are no modules declared in this project.

mill-kotlin - Kotlin compiler support for mill

Quickstart

Mill version 0.6.0 or newer is required.

// Load the plugin from Maven Central via ivy/coursier
import $ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.9:0.1.1`

import mill._
import mill.scalalib._
import mill.define._

import de.tobiasroeser.mill.kotlin._

object main extends KotlinModule {

  // Select the Kotlin version
  def kotlinVersion = T{ "1.3.61" }

  // Set additional Kotlin compiler options, e.g. the language level and annotation processor
  // Run `mill main.kotlincHelp` to get a list of supported options
  def kotlincOptions = Seq("-verbose")

}

Configuration

To target the JVM (kotlin-jvm), our module needs to extend de.tobiasroeser.mill.kotlin.KotlinModule which itself extends mill.scalalib.JavaModule.

For convenience, you may derive your unit test projects from de.tobiasroeser.mill.kotlin.KotlinModule.Tests trait.

The module trait de.tobiasroeser.mill.kotlin.KotlinModule has the following configuration options (over those from mill.scalalib.JavaModule).

def kotlinVersion: T[String]

The Kotlin version to be used (for API and Language level settings).

def kotlinCompilerVersion: T[String]

The version of the Kotlin compiler to be used. Default is derived from kotlinVersion.

def compile: T[CompilationResult]

Compiles all the sources to JVM class files.

def kotlincOptions: T[Seq[String]]

Additional Kotlin compiler options to be use by compile.

def ivyDeps: T[Agg[Dep]]

The compile and runtime dependencies.

def kotlincHelp(args: String*): Command[Unit]

Runs the Kotlin compiler with the -help argument to show you the built-in cmdline help. You might want to add additional arguments like -X to see extra help.

def kotlinCompilerIvyDeps: T[Agg[Dep]]

The Ivy/Coursier dependencies resembling the Kotlin compiler. Default is derived from kotlinCompilerVersion.

def kotlinCompilerClasspath: T[Seq[PathRef]]

The Java classpath resembling the Kotlin compiler. Default is derived from kotlinCompilerIvyDeps.

trait Tests extends TestModule with KotlinTestModule

A test sub-module linked to its parent module best suited for unit-tests.

Version Compatibility Matrix

Mill is still in active development, and has no stable API yet. Hence, not all mill-kotlin versions work with every mill version.

The following table shows a matrix of compatible mill and mill-kotlin versions.

Table 1. Version Compatibility Matrix
mill-kotlin mill

0.1.1

0.6.0 - 0.9.3

0.1.0

0.6.0 - 0.8.0

0.0.3

0.6.0 - 0.6.1

0.0.2

0.5.7

0.0.1

0.5.7

Toe ensure some basic compatibility, there are some integration tests in place. Newer mill versions may work as well.

If you need support for other versions, please create an issue.

Download

You can download binary releases from Maven Central.

Please make sure to use the correct mill platform suffix matching your used mill version.

Table 2. Mill Platform suffix
mill version mill platform suffix example

0.9.3 -

0.9

_mill0.9

$ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.9:0.1.1`

0.7.0 - 0.8.0

0.7

_mill0.7

$ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.7:0.1.1`

0.6.0 - 0.6.3

0.6

_mill0.6

$ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.6:0.1.1`

License

This project is published under the terms of the Apache License, version 2

Supporters

Thanks to iba Consulting Gesellschaft mbH & Co KG for the initial development support.

About

Mill

Mill is a Scala-based open source build tool. In my opinion the best build tool for the JVM. It is fast, reliable and easy to understand.

Me

I am Tobias Roeser a professional software developer who loves to create and use open source tools. I’m actively developing and maintaining mill as well as several mill plugins.

If you like my work, please star it on GitHub. You can also support me via GitHub Sponsors.

Contributing

If you found a bug or have a feature request, please open a new issue on GitHub. I also accept pull requests on GitHub.

Changelog

master

  • Support for mill API 0.9.3

  • Introduced artifact suffix indication the mill platform (e.g. mill0.9)

mill-kotlin 0.1.1 - 2020-12-01

mill-kotlin 0.1.0 - 2020-06-30

  • Cross publish for Mill APi 0.6 and 0.7, also Scala 2.12 and Scala 2.13.

mill-kotlin 0.0.3 - 2020-02-25

  • Updated Mill API to 0.6.0

mill-kotlin 0.0.2 - 2020-02-25

  • Fixed non-functional kotlincHelp target

mill-kotlin 0.0.1 - 2020-02-20

  • Initial release

Versions

Version
0.1.0-6-aa8f84
0.1.0-5-7535ea
0.1.0-4-b5dca4
0.1.0-3-1662eb
0.1.0-2-00540f
0.1.0-1-0f8c94
0.1.0
0.0.3-9-adf440
0.0.3-8-94acea
0.0.3-6-c17468