diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fdfcb3..5697c0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,75 +1,42 @@ -defaults: &defaults - working_directory: ~/repo - docker: - - image: circleci/openjdk:8-jdk - environment: - JVM_OPTS: -Xmx3200m - TERM: dumb +version: 2.1 -version: 2.0 +commands: + build_and_test: + parameters: + reports-dir: + type: string + default: "build/reports/test_results" + steps: + - checkout + - run: + name: Download dependencies + command: ./bld download + - run: + name: Compile source + command: ./bld compile + - run: + name: Run tests + command: ./bld jacoco -reports-dir=<< parameters.reports-dir >> + - store_test_results: + path: << parameters.reports-dir >> + - store_artifacts: + path: build/reports/jacoco/test/html jobs: - build_gradle: - <<: *defaults - + bld_jdk17: + docker: + - image: cimg/openjdk:17.0 steps: - - checkout - - restore_cache: - keys: - - gradle-dependencies-{{ checksum "build.gradle" }} - # fallback to using the latest cache if no exact match is found - - gradle-dependencies- - - - run: - name: Gradle Dependencies - command: ./gradlew dependencies - - - save_cache: - paths: ~/.m2 - key: gradle-dependencies-{{ checksum "build.gradle" }} - - - run: - name: Run All Checks - command: ./gradlew check - - - store_artifacts: - path: build/reports/ - destination: reports - - store_test_results: - path: build/reports/ - - build_kobalt: - <<: *defaults + - build_and_test + bld_jdk21: + docker: + - image: cimg/openjdk:21.0 steps: - - checkout - - restore_cache: - keys: - - kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} - # fallback to using the latest cache if no exact match is found - - kobalt-dependencies- - - - run: - name: Check Versions - command: ./kobaltw checkVersions - - - save_cache: - paths: ~/.kobalt - key: kobalt-dependencies-{{ checksum "kobalt/src/Build.kt" }} - - - run: - name: Assemble & Test - command: ./kobaltw assemble test - - - store_artifacts: - path: kobaltBuild/test-output/ - destination: test-output - - store_test_results: - path: kobaltBuild/test-output/ + - build_and_test workflows: - version: 2 - build_gradle_and_kobalt: + bld: jobs: - - build_gradle - - build_kobalt \ No newline at end of file + - bld_jdk17 + - bld_jdk21 diff --git a/.editorconfig b/.editorconfig index a6971e1..1f808de 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,2 +1,2 @@ [*] -insert_final_newline=true +insert_final_newline = true diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml new file mode 100644 index 0000000..64007ef --- /dev/null +++ b/.github/workflows/bld.yml @@ -0,0 +1,76 @@ +name: bld-ci + +on: [push, pull_request, workflow_dispatch] + +jobs: + build-bld-project: + env: + COVERAGE_JDK: "17" + + strategy: + matrix: + java-version: [17, 21, 24] + os: [ ubuntu-latest, windows-latest, macos-latest ] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout source repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + distribution: "zulu" + java-version: ${{ matrix.java-version }} + + - name: Download dependencies [bld example] + working-directory: examples/java/bld + run: ./bld download + + - name: Compile and run [bld example] + working-directory: examples/java/bld + run: | + ./bld compile + ./bld run + ./bld run-example + + - name: Run example [gradle java examples] + working-directory: examples/java/gradle + run: | + ./gradlew run + ./gradlew runExample + + - name: Run example [gradle kotlin examples] + working-directory: examples/kotlin + run: | + ./gradlew run + ./gradlew runExample + + - name: Download dependencies + run: ./bld download + + - name: Compile source + run: ./bld compile + + - name: Run tests + run: ./bld jacoco + + - name: Remove pom.xml + if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest' + run: rm -rf pom.xml + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest' + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github_changelog_generator b/.github_changelog_generator new file mode 100644 index 0000000..13dd68d --- /dev/null +++ b/.github_changelog_generator @@ -0,0 +1 @@ +future-release=1.2.1 diff --git a/.gitignore b/.gitignore index ff3d427..dd3e0b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,58 @@ -!.vscode/extensions.json -!.vscode/launch.json -!.vscode/settings.json -!.vscode/tasks.json -.classpath -.DS_Store .gradle -.kobalt -.nb-gradle -.project -.settings -.vscode/* -*.code-workspace -*.iws -*.sublime-* -**/.idea/**/dataSources.ids -**/.idea/**/dataSources.local.xml -**/.idea/**/dataSources/ -**/.idea/**/dbnavigator.xml -**/.idea/**/dictionaries -**/.idea/**/dynamic.xml -**/.idea/**/gradle.xml -**/.idea/**/libraries -**/.idea/**/shelf -**/.idea/**/sqlDataSources.xml -**/.idea/**/tasks.xml -**/.idea/**/uiDesigner.xml -**/.idea/**/usage.statistics.xml -**/.idea/**/workspace.xml -**/*.class -/bin -/build -/deploy -/dist -/gen -/gradle.properties -/lib/kotlin* -/libs -/local.properties -/out -/proguard-project.txt -/project.properties -/target -/test-output -ehthumbs.db -kobaltBuild -kobaltw*-test -Thumbs.db \ No newline at end of file +.DS_Store +build +lib/bld/** +!lib/bld/bld-wrapper.properties +!lib/bld/bld-wrapper.jar +lib/compile/ +lib/runtime/ +lib/standalone/ +lib/test/ + +# IDEA ignores + +# User-specific +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Editor-based Rest Client +.idea/httpRequests + +local.properties +target diff --git a/.idea/app.iml b/.idea/app.iml new file mode 100644 index 0000000..6c0f6d7 --- /dev/null +++ b/.idea/app.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/bld.iml b/.idea/bld.iml new file mode 100644 index 0000000..e63e11e --- /dev/null +++ b/.idea/bld.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/java/.idea/encodings.xml b/.idea/bld.xml similarity index 54% rename from examples/java/.idea/encodings.xml rename to .idea/bld.xml index 97626ba..6600cee 100644 --- a/examples/java/.idea/encodings.xml +++ b/.idea/bld.xml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index d91f848..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 6d140d3..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/BSD_3_Clause.xml b/.idea/copyright/BSD_3_Clause.xml new file mode 100644 index 0000000..025a880 --- /dev/null +++ b/.idea/copyright/BSD_3_Clause.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..8b4ad55 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 8ff795e..1e01b48 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,53 +1,8 @@ \ No newline at end of file diff --git a/.idea/intellij-javadocs-4.0.1.xml b/.idea/intellij-javadocs-4.0.1.xml new file mode 100644 index 0000000..fbb9478 --- /dev/null +++ b/.idea/intellij-javadocs-4.0.1.xml @@ -0,0 +1,204 @@ + + + + + UPDATE + false + true + + FIELD + TYPE + METHOD + + + DEFAULT + PUBLIC + PROTECTED + + + + + + ^.*(public|protected|private)*.+interface\s+\w+.* + /**\n + * The interface ${name}.\n +<#if element.typeParameters?has_content> * \n +</#if> +<#list element.typeParameters as typeParameter> + * @param <${typeParameter.name}> the type parameter\n +</#list> + */ + + + ^.*(public|protected|private)*.+enum\s+\w+.* + /**\n + * The enum ${name}.\n + */ + + + ^.*(public|protected|private)*.+class\s+\w+.* + /**\n + * The type ${name}.\n +<#if element.typeParameters?has_content> * \n +</#if> +<#list element.typeParameters as typeParameter> + * @param <${typeParameter.name}> the type parameter\n +</#list> + */ + + + .+ + /**\n + * The type ${name}.\n + */ + + + + + .+ + /**\n + * Instantiates a new ${name}.\n +<#if element.parameterList.parameters?has_content> + *\n +</#if> +<#list element.parameterList.parameters as parameter> + * @param ${parameter.name} the ${paramNames[parameter.name]}\n +</#list> +<#if element.throwsList.referenceElements?has_content> + *\n +</#if> +<#list element.throwsList.referenceElements as exception> + * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n +</#list> + */ + + + + + ^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+ + /**\n + * Gets ${partName}.\n +<#if element.typeParameters?has_content> * \n +</#if> +<#list element.typeParameters as typeParameter> + * @param <${typeParameter.name}> the type parameter\n +</#list> +<#if element.parameterList.parameters?has_content> + *\n +</#if> +<#list element.parameterList.parameters as parameter> + * @param ${parameter.name} the ${paramNames[parameter.name]}\n +</#list> +<#if isNotVoid> + *\n + * @return the ${partName}\n +</#if> +<#if element.throwsList.referenceElements?has_content> + *\n +</#if> +<#list element.throwsList.referenceElements as exception> + * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n +</#list> + */ + + + ^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+ + /**\n + * Sets ${partName}.\n +<#if element.typeParameters?has_content> * \n +</#if> +<#list element.typeParameters as typeParameter> + * @param <${typeParameter.name}> the type parameter\n +</#list> +<#if element.parameterList.parameters?has_content> + *\n +</#if> +<#list element.parameterList.parameters as parameter> + * @param ${parameter.name} the ${paramNames[parameter.name]}\n +</#list> +<#if isNotVoid> + *\n + * @return the ${partName}\n +</#if> +<#if element.throwsList.referenceElements?has_content> + *\n +</#if> +<#list element.throwsList.referenceElements as exception> + * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n +</#list> + */ + + + ^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+ + /**\n + * The entry point of application.\n + + <#if element.parameterList.parameters?has_content> + *\n +</#if> + * @param ${element.parameterList.parameters[0].name} the input arguments\n +<#if element.throwsList.referenceElements?has_content> + *\n +</#if> +<#list element.throwsList.referenceElements as exception> + * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n +</#list> + */ + + + .+ + /**\n + * ${name}<#if isNotVoid> ${return}</#if>.\n +<#if element.typeParameters?has_content> * \n +</#if> +<#list element.typeParameters as typeParameter> + * @param <${typeParameter.name}> the type parameter\n +</#list> +<#if element.parameterList.parameters?has_content> + *\n +</#if> +<#list element.parameterList.parameters as parameter> + * @param ${parameter.name} the ${paramNames[parameter.name]}\n +</#list> +<#if isNotVoid> + *\n + * @return the ${return}\n +</#if> +<#if element.throwsList.referenceElements?has_content> + *\n +</#if> +<#list element.throwsList.referenceElements as exception> + * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n +</#list> + */ + + + + + ^.*(public|protected|private)*.+static.*(\w\s\w)+.+ + /**\n + * The constant ${element.getName()}.\n + */ + + + ^.*(public|protected|private)*.*(\w\s\w)+.+ + /**\n + <#if element.parent.isInterface()> + * The constant ${element.getName()}.\n +<#else> + * The ${name}.\n +</#if> */ + + + .+ + /**\n + <#if element.parent.isEnum()> + *${name} ${typeName}.\n +<#else> + * The ${name}.\n +</#if>*/ + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml deleted file mode 100644 index 5806fb3..0000000 --- a/.idea/kotlinc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml new file mode 100644 index 0000000..a203de8 --- /dev/null +++ b/.idea/libraries/bld.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml new file mode 100644 index 0000000..5316b95 --- /dev/null +++ b/.idea/libraries/compile.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml new file mode 100644 index 0000000..d4069f2 --- /dev/null +++ b/.idea/libraries/runtime.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml new file mode 100644 index 0000000..05f52ce --- /dev/null +++ b/.idea/libraries/test.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d9e04b..61cdf16 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,10 +1,16 @@ - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..55adcb9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/examples-kotlin_main.iml b/.idea/modules/examples-kotlin_main.iml deleted file mode 100644 index 33346db..0000000 --- a/.idea/modules/examples-kotlin_main.iml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules/examples-kotlin_test.iml b/.idea/modules/examples-kotlin_test.iml deleted file mode 100644 index ad47dc2..0000000 --- a/.idea/modules/examples-kotlin_test.iml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml new file mode 100644 index 0000000..5c0ca65 --- /dev/null +++ b/.idea/runConfigurations/Run Tests.xml @@ -0,0 +1,13 @@ + + + +