Kotlin Extension for bld https://github.com/rife2/bld-kotlin
Find a file
Erik C. Thauvin fe46c87334
Updated dependencies
Bumped JUnit version to 5.11.3
Bumped PMD extension version to 1.1.7
Bumped JDK to version 23 (GitHub CI Workflow)
2024-10-27 16:58:52 -07:00
.github/workflows Updated dependencies 2024-10-27 16:58:52 -07:00
.idea Updated dependencies 2024-10-10 13:15:11 -07:00
.vscode Bumped bld to version 2.1.0 2024-08-30 15:16:48 -07:00
config Updated dependencies 2024-10-27 16:58:52 -07:00
examples Updated dependencies 2024-10-27 16:58:52 -07:00
lib/bld Updated dependencies 2024-10-27 16:58:52 -07:00
scripts Cleaned up API to match bld operations and options APIs 2024-08-27 00:35:24 -07:00
src Updated dependencies 2024-10-27 16:58:52 -07:00
.gitignore Fixed dependencies for testing 2023-11-04 02:07:00 -07:00
bld Initial commit 2023-11-03 21:31:09 -07:00
bld.bat Initial commit 2023-11-03 21:31:09 -07:00
LICENSE.txt Initial commit 2023-11-03 21:31:09 -07:00
README.md Bumped bld to version 2.1.0 2024-08-30 15:16:48 -07:00

Kotlin Extension for bld

License Java Kotlin bld Release Snapshot GitHub CI

To install, please refer to the extensions and support documentation.

Compile Kotlin Source Code

To compile the source code located in src/main/kotlin and src/test/kotlin from the current project:


@BuildCommand(summary = "Compiles the Kotlin project")
public void compile() throws Exception {
    new CompileKotlinOperation()
            .fromProject(this)
            .execute();
}
./bld compile

Please check the Compile Operation documentation for all available configuration options.

Kotlin Compiler Requirement

Please make sure the Kotlin compiler is installed.

You can also manually configure the Kotlin home location as follows:


@BuildCommand(summary = "Compiles the Kotlin project")
public void compile() throws Exception {
    new CompileKotlinOperation()
            .fromProject(this)
            .kotlinHome("path/to/kotlin")
            .execute();
}

The Kotlin compiler executable can also be specified directly:


@BuildCommand(summary = "Compiles the Kotlin project")
public void compile() throws Exception {
    new CompileKotlinOperation()
            .fromProject(this)
            .kotlinc("/usr/bin/kotlinc")
            .execute();
}

While older version of Kotlin are likely working with the extension, only version 1.9.24 or higher are officially supported.

Template Project

There is also a Template Project with support for the Dokka and Detekt extensions.