diff --git a/.circleci/config.yml b/.circleci/config.yml index fcc81ca..6c0190e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,54 +1,45 @@ version: 2 defaults: &defaults working_directory: ~/repo + docker: + - image: circleci/openjdk:8-jdk environment: JVM_OPTS: -Xmx3200m TERM: dumb CI: true -defaults_gradle: &defaults_gradle - steps: - - checkout - - restore_cache: - keys: +jobs: + build_gradle: + <<: *defaults + + 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 --stacktrace - - store_artifacts: - path: build/reports/ - destination: reports - - store_test_results: - path: build/reports/ -jobs: - build_gradle_jdk17: - <<: *defaults + - run: + name: Gradle Dependencies + command: ./gradlew dependencies - docker: - - image: cimg/openjdk:17.0 + - save_cache: + paths: ~/.gradle + key: gradle-dependencies-{{ checksum "build.gradle.kts" }} - <<: *defaults_gradle + - run: + name: Run All Checks + command: ./gradlew check --scan - build_gradle_jdk21: - <<: *defaults - - docker: - - image: cimg/openjdk:21.0 - - <<: *defaults_gradle + - store_artifacts: + path: build/reports/ + destination: reports + - store_test_results: + path: build/reports/ workflows: version: 2 - gradle: + build_gradle: jobs: - - build_gradle_jdk21 - - build_gradle_jdk17 + - build_gradle diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 71d4858..f1ac387 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,46 +1,19 @@ -name: gradle-ci +name: Java CI with Gradle on: [push, pull_request, workflow_dispatch] jobs: build: + runs-on: ubuntu-latest - env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" - - strategy: - matrix: - java-version: [17, 21, 24] - steps: - - 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: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Cache Gradle packages - uses: actions/cache@v4 - 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 - - - name: Cleanup Gradle Cache - run: | - rm -f ~/.gradle/caches/modules-2/modules-2.lock - rm -f ~/.gradle/caches/modules-2/gc.properties + - 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 diff --git a/.gitignore b/.gitignore index 0742f86..f007981 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,12 @@ +.vscode/* !.vscode/extensions.json !.vscode/launch.json !.vscode/settings.json !.vscode/tasks.json -*.class -*.code-workspace -*.ctxt -*.iws -*.log -*.nar -*.rar -*.sublime-* -*.tar.gz -*.zip -.DS_Store + +__pycache__ .classpath +.DS_Store .gradle .history .kobalt @@ -24,9 +17,17 @@ .project .scannerwork .settings -.vscode/* -/**/.idea/$CACHE_FILE$ -/**/.idea/$PRODUCT_WORKSPACE_FILE$ +*.class +*.code-workspace +*.ctxt +*.iws +*.log +*.nar +*.rar +*.sublime-* +*.tar.gz +*.zip +/**/.idea_modules/ /**/.idea/**/caches/build_file_checksums.ser /**/.idea/**/contentModel.xml /**/.idea/**/dataSources.ids @@ -47,10 +48,8 @@ /**/.idea/**/uiDesigner.xml /**/.idea/**/usage.statistics.xml /**/.idea/**/workspace.xml -/**/.idea/sonarlint* -/**/.idea_modules/ -Thumbs.db -__pycache__ +/**/.idea/$CACHE_FILE$ +/**/.idea/$PRODUCT_WORKSPACE_FILE$ atlassian-ide-plugin.xml bin/ build/ @@ -64,6 +63,7 @@ dist/ ehthumbs.db fabric.properties gen/ +gradle.properties hs_err_pid* kobaltBuild kobaltw*-test @@ -71,7 +71,6 @@ lib/kotlin* libs/ local.properties out/ -pom.xml.asc pom.xml.next pom.xml.releaseBackup pom.xml.tag @@ -81,4 +80,5 @@ project.properties release.properties target/ test-output +Thumbs.db venv diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e73cce4..26820aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: gradle:8-jdk17 +image: gradle:alpine variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" @@ -12,7 +12,7 @@ stages: build: stage: build - script: gradle --build-cache assemble + script: ./gradlew --build-cache assemble cache: key: "$CI_COMMIT_REF_NAME" policy: push @@ -22,7 +22,7 @@ build: test: stage: test - script: gradle check --stacktrace + script: ./gradlew check cache: key: "$CI_COMMIT_REF_NAME" policy: pull diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index eb0e453..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -semver-gradle diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 3ad4dc5..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index 79ee123..d91f848 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index b589d56..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index 56b596e..98b5537 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -26,20 +26,5 @@