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: docker: - image: cimg/openjdk:23.0 steps: - build_and_test: kotlin: 2.1.0 workflows: bld: jobs: - bld