BREAKING CHANGE: Kotlin must be installed. Location is deducted from KOTLIN_HOME, if set.

This commit is contained in:
Erik C. Thauvin 2024-07-12 02:13:13 -07:00
parent c84019de2c
commit 6fa3bdefdb
Signed by: erik
GPG key ID: 776702A6A2DA330E
8 changed files with 190 additions and 96 deletions

View file

@ -2,7 +2,7 @@
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.0-7f52ff.svg)](https://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9%2B-7f52ff.svg)](https://kotlinlang.org)
[![bld](https://img.shields.io/badge/1.9.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-kotlin/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-kotlin)
[![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-kotlin/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-kotlin)
@ -33,6 +33,24 @@ public void compile() throws Exception {
Please check the [Compile Operation documentation](https://rife2.github.io/bld-kotlin/rife/bld/extension/CompileKotlinOperation.html#method-summary)
for all available configuration options.
## Kotlin Compiler Requirement
Please make sure Kotlin is installed and that the `KOTLIN_HOME` environment variable is set.
You can also manually configure the Kotlin home location as follows:
```java
@BuildCommand(summary = "Compiles the Kotlin project")
public void compile() throws Exception {
new CompileKotlinOperation()
.fromProject(this)
.kotlinHome("path/to/kotlin")
.execute();
}
```
While older version of Kotlin are likely working with the extension, only version 1.9 or higher are officially supported.
## Template Project
There is also a [Template Project](https://github.com/rife2/kotlin-bld-example) with support for the [Dokka](https://github.com/rife2/bld-dokka) and [Detekt](https://github.com/rife2/bld-detekt) extensions.