diff --git a/.circleci/config.yml b/.circleci/config.yml index c781fdc..d21cbc7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,62 +1,54 @@ -version: 2.1 - -orbs: - sdkman: joshdholtz/sdkman@0.2.0 - +version: 2 defaults: &defaults working_directory: ~/repo environment: JVM_OPTS: -Xmx3200m TERM: dumb - CI_NAME: "CircleCI" + CI: true -commands: - build_and_test: - parameters: - reports-dir: - type: string - default: "build/reports/test_results" - steps: - - checkout - - sdkman/setup-sdkman - - sdkman/sdkman-install: - candidate: kotlin - version: 2.1.10 - - 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_gradle + steps: + - checkout + - restore_cache: + keys: + - gradle-dependencies-{{ checksum "build.gradle.kts" }} + # 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.kts" }} + - run: + name: Run All Checks + command: ./gradlew check + - store_artifacts: + path: build/reports/ + destination: reports + - store_test_results: + path: build/reports/ jobs: - bld_jdk17: + build_gradle_jdk14: <<: *defaults docker: - - image: cimg/openjdk:17.0 + - image: openjdk:14-jdk - steps: - - build_and_test + <<: *defaults_gradle - bld_jdk21: + build_gradle_jdk8: <<: *defaults docker: - - image: cimg/openjdk:21.0 + - image: circleci/openjdk:8-jdk - steps: - - build_and_test + <<: *defaults_gradle workflows: - bld: - jobs: - - bld_jdk17 - - bld_jdk21 + version: 2 + gradle: + jobs: + - build_gradle_jdk8 + - build_gradle_jdk14 diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml deleted file mode 100644 index e6e7ffa..0000000 --- a/.github/workflows/bld.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: bld-ci - -on: [ push, pull_request, workflow_dispatch ] - -env: - COVERAGE_JDK: "21" - COVERAGE_KOTLIN: "2.1.20" - PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }} - -jobs: - build-bld-project: - strategy: - matrix: - java-version: [ 17, 21, 24 ] - kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ] - 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 }} with Kotlin ${{ matrix.kotlin-version }} - uses: actions/setup-java@v4 - with: - distribution: "zulu" - java-version: ${{ matrix.java-version }} - - - name: Download dependencies [bld example] - working-directory: examples/bld - run: ./bld download - - - name: Compile and run examples [bld example] - working-directory: examples/bld - run: | - ./bld compile - ./bld run - ./bld run-java - - - name: Run example [gradle java example] - working-directory: examples/gradle/java - run: | - ./gradlew run - - - name: Run example [gradle kotlin example] - working-directory: examples/gradle/kotlin - run: | - ./gradlew run - - - 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.kotlin-version == env.COVERAGE_KOTLIN - && 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.kotlin-version == env.COVERAGE_KOTLIN - && matrix.os == 'ubuntu-latest' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..540b054 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,21 @@ +name: Java CI with Gradle + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Test with Gradle + run: ./gradlew check + env: + PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }} diff --git a/.github_changelog_generator b/.github_changelog_generator index 19e45d2..2b8ee46 100644 --- a/.github_changelog_generator +++ b/.github_changelog_generator @@ -1 +1 @@ -future-release=1.1.0 +future-release=1.0.3 diff --git a/.gitignore b/.gitignore index 3402a75..9dda44b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,58 +1,47 @@ -.gradle +!.vscode/extensions.json +!.vscode/launch.json +!.vscode/settings.json +!.vscode/tasks.json +**/*.class +**/.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 +*.code-workspace +*.iws +*.sublime-* .DS_Store -build -lib/bld/** -!lib/bld/bld-wrapper.jar -!lib/bld/bld-wrapper.properties -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 +.classpath +.gradle +.kobalt +.nb-gradle +.project +.settings +.vscode/* +/bin +/build +/deploy +/dist +/gen +/gradle.properties +/local.properties +/out +/proguard-project.txt +/project.properties +/target +/test-output +Thumbs.db +ehthumbs.db +kobaltBuild +kobaltw*-test +pom.xml.asc diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10b9b0f..26820aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,31 @@ -image: fedora:latest +image: gradle:alpine variables: - CI_NAME: "GitLab CI" - -stages: - - test + GRADLE_OPTS: "-Dorg.gradle.daemon=false" before_script: - - dnf -qy update && dnf -y install zip - - curl -s "https://get.sdkman.io" | bash - - echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config - - echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config - - source "$HOME/.sdkman/bin/sdkman-init.sh" - - sdk install java - - sdk install kotlin - - source "$HOME/.sdkman/bin/sdkman-init.sh" + - export GRADLE_USER_HOME=`pwd`/.gradle + +stages: + - build + - test + +build: + stage: build + script: ./gradlew --build-cache assemble + cache: + key: "$CI_COMMIT_REF_NAME" + policy: push + paths: + - build + - .gradle test: stage: test - script: - - ./bld download - - ./bld compile - - ./bld test + script: ./gradlew check + cache: + key: "$CI_COMMIT_REF_NAME" + policy: pull + paths: + - build + - .gradle diff --git a/.idea/app.iml b/.idea/app.iml deleted file mode 100644 index 2c1fe21..0000000 --- a/.idea/app.iml +++ /dev/null @@ -1,30 +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/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/checkstyle-idea.xml b/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..95c433c --- /dev/null +++ b/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..d91f848 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..4e8da37 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/copyright/Erik_s_Copyright_Notice.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml index ab1f825..82870eb 100644 --- a/.idea/copyright/Erik_s_Copyright_Notice.xml +++ b/.idea/copyright/Erik_s_Copyright_Notice.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index 1419e40..b03a87e 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,3 +1,15 @@ - + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/bld.xml b/.idea/encodings.xml similarity index 54% rename from examples/bld/.idea/bld.xml rename to .idea/encodings.xml index 6600cee..97626ba 100644 --- a/examples/bld/.idea/bld.xml +++ b/.idea/encodings.xml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/.idea/icon.svg b/.idea/icon.svg deleted file mode 100644 index 94a6708..0000000 --- a/.idea/icon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 94f28ea..8ff795e 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,9 +1,53 @@ \ No newline at end of file diff --git a/examples/gradle/java/.idea/jarRepositories.xml b/.idea/jarRepositories.xml similarity index 84% rename from examples/gradle/java/.idea/jarRepositories.xml rename to .idea/jarRepositories.xml index a529ef2..3d4ac96 100644 --- a/examples/gradle/java/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -17,9 +17,9 @@