diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..097f9f9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml deleted file mode 100644 index a2d12cb..0000000 --- a/.github/workflows/bld.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: bld-ci - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - build-gradle-project: - runs-on: ubuntu-latest - - strategy: - matrix: - java-version: [ 17, 19, 20 ] - - steps: - - name: Checkout source repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - - - name: Run tests - run: >- - ./bld download compile test - -DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn/urlencoder - -DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..e74b032 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,63 @@ +name: gradle-ci + +on: [push, pull_request, workflow_dispatch] + +jobs: + build-gradle-project: + runs-on: ubuntu-latest + + env: + GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" + SONAR_JDK: "11" + + strategy: + matrix: + java-version: [ 11, 17, 19 ] + + steps: + - name: Checkout source repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: ${{ matrix.java-version }} + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Cache SonarCloud packages + if: matrix.java-version == env.SONAR_JDK + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle-${{ matrix.java-version }}- + + - name: Test with Gradle + run: ./gradlew build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }} + + - name: SonarCloud + if: success() && matrix.java-version == env.SONAR_JDK + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew jacocoTestReport sonar --info + + - name: Cleanup Gradle Cache + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties \ No newline at end of file diff --git a/.gitignore b/.gitignore index a63b224..d49a8b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,55 +1,3 @@ .gradle -.DS_Store build -lib/bld/** -lib/compile/** -lib/runtime/** -lib/standalone/** -lib/test/** -!bld-wrapper.jar -!bld-wrapper.properties - -# 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 \ No newline at end of file +.idea diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/app.iml b/.idea/app.iml deleted file mode 100644 index 93f59aa..0000000 --- a/.idea/app.iml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/bld.iml b/.idea/bld.iml deleted file mode 100644 index e63e11e..0000000 --- a/.idea/bld.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml deleted file mode 100644 index 4bb3867..0000000 --- a/.idea/libraries/bld.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml deleted file mode 100644 index 143dc93..0000000 --- a/.idea/libraries/compile.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml deleted file mode 100644 index 81feb0b..0000000 --- a/.idea/libraries/runtime.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml deleted file mode 100644 index c16475a..0000000 --- a/.idea/libraries/test.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 8678395..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 55adcb9..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Run Main.xml b/.idea/runConfigurations/Run Main.xml deleted file mode 100644 index bee13f8..0000000 --- a/.idea/runConfigurations/Run Main.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml deleted file mode 100644 index bee07c9..0000000 --- a/.idea/runConfigurations/Run Tests.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - -