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:
parent
bb480c6796
commit
d6228f1766
9 changed files with 109 additions and 19 deletions
61
.cirleci/config.yml
Normal file
61
.cirleci/config.yml
Normal 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
|
25
.github/workflows/bld.yml
vendored
25
.github/workflows/bld.yml
vendored
|
@ -1,6 +1,9 @@
|
||||||
name: bld-ci
|
name: bld-ci
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
KOTLIN_HOME: /usr/share/kotlinc
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-gradle-project:
|
build-gradle-project:
|
||||||
|
@ -8,7 +11,8 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [17, 21, 22]
|
java-version: [ 17, 21, 22 ]
|
||||||
|
kotlin-version: [ 1.19.24, 2.0.0 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
|
@ -16,16 +20,25 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Download dependencies
|
||||||
run: ./bld download compile detekt test
|
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: |
|
run: |
|
||||||
./bld javadoc
|
./bld javadoc
|
||||||
./bld dokka-html
|
./bld dokka-html
|
||||||
|
|
6
.idea/bld.xml
generated
Normal file
6
.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BldConfiguration">
|
||||||
|
<events />
|
||||||
|
</component>
|
||||||
|
</project>
|
4
.idea/libraries/bld.xml
generated
4
.idea/libraries/bld.xml
generated
|
@ -2,12 +2,12 @@
|
||||||
<library name="bld">
|
<library name="bld">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<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>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
<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>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||||
|
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -9,7 +9,7 @@
|
||||||
],
|
],
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"${HOME}/.bld/dist/bld-1.9.1.jar",
|
"${HOME}/.bld/dist/bld-2.0.1.jar",
|
||||||
"lib/**/*.jar"
|
"lib/**/*.jar"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# [Kotlin](https://kotlinlang.org/) Example Project for [b<span style="color:orange">l</span>d](https://rife2.com/bld)
|
# [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
|
## Compile the Example
|
||||||
|
|
||||||
|
@ -34,3 +34,7 @@ Template for [bld](https://rife2.com/bld) projects using the [Kotlin extension](
|
||||||
./bld dokka-gfm
|
./bld dokka-gfm
|
||||||
./bld dokka-jekyll
|
./bld dokka-jekyll
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- A Kotlin compiler must be [installed](https://kotlinlang.org/docs/command-line.html#install-the-compiler).
|
Binary file not shown.
|
@ -1,8 +1,12 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
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.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.sourceDirectories=
|
||||||
bld.version=1.9.1
|
bld.version=2.0.1
|
||||||
|
|
|
@ -4,7 +4,7 @@ import rife.bld.BuildCommand;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.extension.CompileKotlinOperation;
|
import rife.bld.extension.CompileKotlinOperation;
|
||||||
import rife.bld.extension.DetektOperation;
|
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.LoggingLevel;
|
||||||
import rife.bld.extension.dokka.OutputFormat;
|
import rife.bld.extension.dokka.OutputFormat;
|
||||||
import rife.bld.operations.exceptions.ExitStatusException;
|
import rife.bld.operations.exceptions.ExitStatusException;
|
||||||
|
@ -35,15 +35,15 @@ public class ExampleBuild extends Project {
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 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, 2)));
|
.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
|
// Include the Kotlin source directory when creating or publishing sources Java Archives
|
||||||
jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin"));
|
jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
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 level = Level.ALL;
|
||||||
// var logger = Logger.getLogger("rife.bld.extension");
|
// var logger = Logger.getLogger("rife.bld.extension");
|
||||||
// var consoleHandler = new ConsoleHandler();
|
// var consoleHandler = new ConsoleHandler();
|
||||||
|
@ -58,10 +58,12 @@ public class ExampleBuild extends Project {
|
||||||
|
|
||||||
@BuildCommand(summary = "Compiles the Kotlin project")
|
@BuildCommand(summary = "Compiles the Kotlin project")
|
||||||
@Override
|
@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
|
// The source code located in src/main/kotlin and src/test/kotlin will be compiled
|
||||||
new CompileKotlinOperation()
|
new CompileKotlinOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
// .kotlinHome("path/to/kotlin")
|
||||||
|
// .kotlinc("path/to/kotlinc")
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
// var op = new CompileKotlinOperation().fromProject(this);
|
// var op = new CompileKotlinOperation().fromProject(this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue