Updated dependencies

Bumped bld to version 2.0.1
Bumped Kotlin extension to version 1.0.0
Bumped Dokka extension to version 1.0.0
Bumped Detekt extension to version 0.9.5
Bumped JUnit to version 5.10.3
This commit is contained in:
Erik C. Thauvin 2024-07-29 16:54:22 -07:00
parent bb480c6796
commit d6228f1766
Signed by: erik
GPG key ID: 776702A6A2DA330E
9 changed files with 109 additions and 19 deletions

61
.cirleci/config.yml Normal file
View file

@ -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

View file

@ -2,6 +2,9 @@ name: bld-ci
on: [ push, pull_request, workflow_dispatch ]
env:
KOTLIN_HOME: /usr/share/kotlinc
jobs:
build-gradle-project:
runs-on: ubuntu-latest
@ -9,6 +12,7 @@ jobs:
strategy:
matrix:
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

6
.idea/bld.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BldConfiguration">
<events />
</component>
</project>

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -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"
]
}

View file

@ -1,6 +1,6 @@
# [Kotlin](https://kotlinlang.org/) Example Project for [b<span style="color:orange">l</span>d](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).

Binary file not shown.

View file

@ -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

View file

@ -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,8 +35,8 @@ 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"));
@ -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);