diff --git a/.circleci/config.yml b/.circleci/config.yml index e6c4f38..7bf833e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,19 +30,19 @@ defaults_gradle: &defaults_gradle path: build/reports/ jobs: - build_gradle_jdk18: + build_gradle_jdk14: <<: *defaults docker: - - image: cimg/openjdk:18.0 + - image: openjdk:14-jdk <<: *defaults_gradle - build_gradle_jdk11: + build_gradle_jdk8: <<: *defaults docker: - - image: cimg/openjdk:11.0 + - image: circleci/openjdk:8-jdk <<: *defaults_gradle @@ -50,6 +50,6 @@ workflows: version: 2 gradle: jobs: - - build_gradle_jdk11 - - build_gradle_jdk18 + - build_gradle_jdk8 + - build_gradle_jdk14 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ea3926d..0ee725c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,63 +1,21 @@ -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" - SONAR_JDK: "11" - - strategy: - matrix: - java-version: [ 11, 18 ] - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v1 - with: - 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 - env: - BITLY_ACCESS_TOKEN: ${{ secrets.BITLY_ACCESS_TOKEN }} - run: ./gradlew build check --stacktrace - - - name: SonarCloud - if: success() && matrix.java-version == env.SONAR_JDK - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew sonarqube - - - 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 + env: + BITLY_ACCESS_TOKEN: ${{ secrets.BITLY_ACCESS_TOKEN }} diff --git a/.gitignore b/.gitignore index 13a066e..a602396 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ /**/.idea/**/uiDesigner.xml /**/.idea/**/usage.statistics.xml /**/.idea/**/workspace.xml -/**/.idea/sonarlint* /**/.idea_modules/ Thumbs.db __pycache__ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ff47e3..26820aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ -image: gradle:7-jdk11 +image: gradle:alpine variables: - GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" + GRADLE_OPTS: "-Dorg.gradle.daemon=false" before_script: - export GRADLE_USER_HOME=`pwd`/.gradle @@ -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 + script: ./gradlew check cache: key: "$CI_COMMIT_REF_NAME" policy: pull diff --git a/.idea/bitly-shorten.iml b/.idea/bitly-shorten.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/.idea/bitly-shorten.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ 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 3889459..08660a1 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/jarRepositories.xml b/.idea/jarRepositories.xml index 37ad52e..d80efca 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -36,20 +36,5 @@