diff --git a/.cirleci/config.yml b/.cirleci/config.yml
new file mode 100644
index 0000000..37887bf
--- /dev/null
+++ b/.cirleci/config.yml
@@ -0,0 +1,61 @@
+version: 2.1
+
+orbs:
+ sdkman: joshdholtz/sdkman@0.2.0
+
+commands:
+ build_and_test:
+ parameters:
+ kotlin:
+ type: string
+ reports-dir:
+ type: string
+ default: "build/reports/test_results"
+ steps:
+ - checkout
+ - sdkman/setup-sdkman
+ - sdkman/sdkman-install:
+ candidate: kotlin
+ version: << parameters.kotlin >>
+ - run:
+ name: Download dependencies
+ command: ./bld download
+ - run:
+ name: Compile source
+ command: ./bld compile
+ - run:
+ name: Check source with Detekt
+ command: ./bld detekt
+ - run:
+ name: Run tests
+ command: ./bld test -reports-dir=<< parameters.reports-dir >>
+ - run:
+ name: Generate documentation with Dokka
+ command: |
+ ./bld javadoc
+ ./bld dokka-html
+ ./bld dokka-gfm
+ ./bld dokka-jekyll
+ - store_test_results:
+ path: << parameters.reports-dir >>
+
+jobs:
+ bld_jdk17:
+ docker:
+ - image: cimg/openjdk:17
+ steps:
+ - build_and_test:
+ kotlin: 1.9.24
+
+ bld_jdk21:
+ docker:
+ - image: cimg/openjdk:21
+ steps:
+ - build_and_test:
+ kotlin: 2.0.0
+
+workflows:
+ bld:
+ jobs:
+ - bld_jdk17
+ - bld_jdk21
\ No newline at end of file
diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml
index 9aebdef..55e101f 100644
--- a/.github/workflows/bld.yml
+++ b/.github/workflows/bld.yml
@@ -1,6 +1,9 @@
name: bld-ci
-on: [push, pull_request, workflow_dispatch]
+on: [ push, pull_request, workflow_dispatch ]
+
+env:
+ KOTLIN_HOME: /usr/share/kotlinc
jobs:
build-gradle-project:
@@ -8,7 +11,8 @@ jobs:
strategy:
matrix:
- java-version: [17, 21, 22]
+ java-version: [ 17, 21, 22 ]
+ kotlin-version: [ 1.19.24, 2.0.0 ]
steps:
- name: Checkout source repository
@@ -16,16 +20,25 @@ jobs:
with:
fetch-depth: 0
- - name: Set up JDK ${{ matrix.java-version }}
+ - name: Set up JDK ${{ matrix.java-version }} with Kotlin ${{ matrix.kotlin-version }}
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java-version }}
- - name: Run tests
- run: ./bld download compile detekt test
+ - name: Download dependencies
+ run: ./bld download
- - name: Build documentation
+ - name: Compile source
+ run: ./bld compile
+
+ - name: Check source with Detekt
+ run: ./bld detekt
+
+ - name: Run tests
+ run: ./bld test
+
+ - name: Generate documentation with Dokka
run: |
./bld javadoc
./bld dokka-html
diff --git a/.idea/bld.xml b/.idea/bld.xml
new file mode 100644
index 0000000..6600cee
--- /dev/null
+++ b/.idea/bld.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index a2969be..4dd96bf 100644
--- a/.idea/libraries/bld.xml
+++ b/.idea/libraries/bld.xml
@@ -2,12 +2,12 @@
-
+
-
+
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d136e4d..5b2667b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -9,7 +9,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
- "${HOME}/.bld/dist/bld-1.9.1.jar",
+ "${HOME}/.bld/dist/bld-2.0.1.jar",
"lib/**/*.jar"
]
}
diff --git a/README.md b/README.md
index 34b916b..a02ec62 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# [Kotlin](https://kotlinlang.org/) Example Project for [bld](https://rife2.com/bld)
-Template for [bld](https://rife2.com/bld) projects using the [Kotlin extension](https://github.com/rife2/bld-kotlin) with built-in support for Dokka and the [Detekt extension](https://github.com/rife2/bld-detekt).
+Template for [bld](https://rife2.com/bld) projects using the [Kotlin extension](https://github.com/rife2/bld-kotlin) with built-in support for the [Dokka](https://github.com/rife2/bld-dokka) and [Detekt](https://github.com/rife2/bld-detekt) extensions.
## Compile the Example
@@ -34,3 +34,7 @@ Template for [bld](https://rife2.com/bld) projects using the [Kotlin extension](
./bld dokka-gfm
./bld dokka-jekyll
```
+
+## Requirements
+
+- A Kotlin compiler must be [installed](https://kotlinlang.org/docs/command-line.html#install-the-compiler).
\ No newline at end of file
diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar
index e75c126..10a7e39 100644
Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ
diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties
index 3e7152d..44ba02c 100644
--- a/lib/bld/bld-wrapper.properties
+++ b/lib/bld/bld-wrapper.properties
@@ -1,8 +1,12 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
-bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.8
-bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.4
-bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation=
+bld.extensions=
+bld.javaOptions=
+bld.javacOptions=
+bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.5
+bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.0
+bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.0
+bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
bld.sourceDirectories=
-bld.version=1.9.1
+bld.version=2.0.1
diff --git a/src/bld/java/com/example/ExampleBuild.java b/src/bld/java/com/example/ExampleBuild.java
index 54818ec..7cc3410 100644
--- a/src/bld/java/com/example/ExampleBuild.java
+++ b/src/bld/java/com/example/ExampleBuild.java
@@ -4,7 +4,7 @@ import rife.bld.BuildCommand;
import rife.bld.Project;
import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.DetektOperation;
-import rife.bld.extension.dokka.DokkaOperation;
+import rife.bld.extension.DokkaOperation;
import rife.bld.extension.dokka.LoggingLevel;
import rife.bld.extension.dokka.OutputFormat;
import rife.bld.operations.exceptions.ExitStatusException;
@@ -35,15 +35,15 @@ public class ExampleBuild extends Project {
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
scope(test)
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
- .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
- .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)));
+ .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 3)))
+ .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 3)));
// Include the Kotlin source directory when creating or publishing sources Java Archives
jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin"));
}
public static void main(String[] args) {
-// Enable detailed logging for the Kotlin extension
+ // Enable detailed logging for the Kotlin extension
// var level = Level.ALL;
// var logger = Logger.getLogger("rife.bld.extension");
// var consoleHandler = new ConsoleHandler();
@@ -58,10 +58,12 @@ public class ExampleBuild extends Project {
@BuildCommand(summary = "Compiles the Kotlin project")
@Override
- public void compile() throws IOException {
+ public void compile() throws Exception {
// The source code located in src/main/kotlin and src/test/kotlin will be compiled
new CompileKotlinOperation()
.fromProject(this)
+// .kotlinHome("path/to/kotlin")
+// .kotlinc("path/to/kotlinc")
.execute();
// var op = new CompileKotlinOperation().fromProject(this);