Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ethauvin committed Jul 29, 2024
1 parent bb480c6 commit d6228f1
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 18 deletions.
61 changes: 61 additions & 0 deletions .cirleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: 2.1

orbs:
sdkman: joshdholtz/[email protected]

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
23 changes: 18 additions & 5 deletions .github/workflows/bld.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
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:
runs-on: ubuntu-latest

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
uses: actions/checkout@v4
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: Download dependencies
run: ./bld download

- name: Compile source
run: ./bld compile

- name: Check source with Detekt
run: ./bld detekt

- name: Run tests
run: ./bld download compile detekt test
run: ./bld test

- name: Build documentation
- name: Generate documentation with Dokka
run: |
./bld javadoc
./bld dokka-html
Expand Down
6 changes: 6 additions & 0 deletions .idea/bld.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/libraries/bld.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 modified lib/bld/bld-wrapper.jar
Binary file not shown.
12 changes: 8 additions & 4 deletions lib/bld/bld-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
12 changes: 7 additions & 5 deletions src/bld/java/com/example/ExampleBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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;
Expand Down Expand Up @@ -35,15 +35,15 @@ public ExampleBuild() {
.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();
Expand All @@ -58,10 +58,12 @@ public static void main(String[] args) {

@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);
Expand Down

0 comments on commit d6228f1

Please sign in to comment.