diff --git a/.circleci/config.yml b/.circleci/config.yml index 5697c0d..65723f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,42 +1,41 @@ -version: 2.1 +inversion: 2 +defaults: &defaults + working_directory: ~/repo + environment: + JVM_OPTS: -Xmx3200m + TERM: dumb + CI_NAME: "CircleCI" -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 +defaults_gradle: &defaults_bld + steps: + - checkout + - run: + name: Download the dependencies + command: ./bld download + - run: + name: Run tests with bld + command: ./bld compile test jobs: + bld_jdk20: + <<: *defaults + + docker: + - image: cimg/openjdk:20.0 + + <<: *defaults_bld + bld_jdk17: + <<: *defaults + docker: - image: cimg/openjdk:17.0 - steps: - - build_and_test - bld_jdk21: - docker: - - image: cimg/openjdk:21.0 - steps: - - build_and_test + <<: *defaults_bld workflows: + version: 2 bld: jobs: - bld_jdk17 - - bld_jdk21 + - bld_jdk20 diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 64007ef..79093d1 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -1,76 +1,53 @@ name: bld-ci -on: [push, pull_request, workflow_dispatch] +on: [ push, pull_request, workflow_dispatch ] jobs: build-bld-project: + runs-on: ubuntu-latest + env: - COVERAGE_JDK: "17" + COVERAGE_SDK: "17" strategy: matrix: - java-version: [17, 21, 24] - os: [ ubuntu-latest, windows-latest, macos-latest ] - - runs-on: ${{ matrix.os }} + java-version: [ 17, 20 ] steps: - name: Checkout source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: - distribution: "zulu" + distribution: 'zulu' java-version: ${{ matrix.java-version }} - - name: Download dependencies [bld example] - working-directory: examples/java/bld + - name: Grant execute permission for bld + run: chmod +x bld + + - name: Download the dependencies 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: Run tests with bld + run: ./bld compile jacoco - name: Remove pom.xml - if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.os == 'ubuntu-latest' + if: success() && matrix.java-version == env.COVERAGE_SDK 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' + if: success() && matrix.java-version == env.COVERAGE_SDK 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' + if: success() && matrix.java-version == env.COVERAGE_SDK env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + diff --git a/.gitignore b/.gitignore index dd3e0b4..091e664 100644 --- a/.gitignore +++ b/.gitignore @@ -54,5 +54,4 @@ atlassian-ide-plugin.xml # Editor-based Rest Client .idea/httpRequests -local.properties -target +local.properties \ No newline at end of file diff --git a/.idea/app.iml b/.idea/app.iml index 6c0f6d7..787b59b 100644 --- a/.idea/app.iml +++ b/.idea/app.iml @@ -6,9 +6,10 @@ - + + diff --git a/.idea/bld.xml b/.idea/bld.xml deleted file mode 100644 index 6600cee..0000000 --- a/.idea/bld.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..40012f2 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index 8b4ad55..dd82085 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,3 +1,7 @@ - + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 1e01b48..7c26c8e 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -2,7 +2,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 deleted file mode 100644 index fbb9478..0000000 --- a/.idea/intellij-javadocs-4.0.1.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - - 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/examples/java/gradle/.idea/jarRepositories.xml b/.idea/jarRepositories.xml similarity index 100% rename from examples/java/gradle/.idea/jarRepositories.xml rename to .idea/jarRepositories.xml diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..f8467b4 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index a203de8..722b42e 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,11 @@ - + - - + diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml index 5316b95..9bd86aa 100644 --- a/.idea/libraries/compile.xml +++ b/.idea/libraries/compile.xml @@ -2,16 +2,12 @@ - - - - - - + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml index d4069f2..2ae5c4b 100644 --- a/.idea/libraries/runtime.xml +++ b/.idea/libraries/runtime.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml index 05f52ce..b80486a 100644 --- a/.idea/libraries/test.xml +++ b/.idea/libraries/test.xml @@ -2,17 +2,13 @@ - - - - - - + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 61cdf16..32dcb40 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -2,15 +2,20 @@ - - + + + - \ No newline at end of file + diff --git a/.idea/modules.xml b/.idea/modules.xml index 55adcb9..c98f120 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -4,6 +4,7 @@ + \ No newline at end of file diff --git a/.idea/modules/examples-java.main.iml b/.idea/modules/examples-java.main.iml new file mode 100644 index 0000000..807b620 --- /dev/null +++ b/.idea/modules/examples-java.main.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml index 5c0ca65..4f6af10 100644 --- a/.idea/runConfigurations/Run Tests.xml +++ b/.idea/runConfigurations/Run Tests.xml @@ -1,11 +1,7 @@ - + +