From 54ac6f549987b03c501945c4fb315b2cfe410b66 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 20 Jun 2021 10:39:03 -0700 Subject: [PATCH] Update to Java 16 and new sonar cloud --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++++++ .travis.yml | 22 --------------------- README.md | 2 ++ pom.xml | 21 ++++++++++++-------- src/main/resources/addon.yml | 2 +- 5 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b9cf60c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build +on: + push: + branches: + - develop + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 16 + uses: actions/setup-java@v1 + with: + java-version: 16 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f51d0a3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: java -sudo: false -addons: - sonarcloud: - organization: "bentobox-world" - -jdk: - - openjdk8 - - openjdk11 - -matrix: - allow_failures: - - jdk: openjdk11 - -script: - # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis - - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=BentoBoxWorld_Level - -cache: - directories: - - '$HOME/.m2/repository' - - '$HOME/.sonar/cache' diff --git a/README.md b/README.md index c2b75a7..c746a33 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Level [![Build Status](https://ci.codemc.org/buildStatus/icon?job=BentoBoxWorld/Level)](https://ci.codemc.org/job/BentoBoxWorld/job/Level/) +## Note: Java 16 and Minecraft 17, or higher are now required + Add-on for BentoBox to calculate island levels for BSkyBlock and AcidIsland. This add-on will work for game modes listed in the config.yml. diff --git a/pom.xml b/pom.xml index 64eb932..48337c8 100644 --- a/pom.xml +++ b/pom.xml @@ -54,11 +54,11 @@ UTF-8 UTF-8 - 1.8 + 16 2.0.2 - 1.16.3-R0.1-SNAPSHOT + 1.17-R0.1-SNAPSHOT 1.17.0-SNAPSHOT ${build.version}-SNAPSHOT @@ -66,6 +66,9 @@ -LOCAL 2.7.0 + BentoBoxWorld_Level + bentobox-world + https://sonarcloud.io @@ -246,16 +249,20 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 + 3.8.0 - ${java.version} - ${java.version} + ${java.version} org.apache.maven.plugins maven-surefire-plugin 2.22.0 + + + --illegal-access=permit + + org.apache.maven.plugins @@ -269,10 +276,8 @@ false -Xdoclint:none - - 8 + 16 diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 0e97400..181fe2c 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -2,7 +2,7 @@ name: Level main: world.bentobox.level.Level version: ${version}${build.number} icon: DIAMOND -api-version: 1.15.4 +api-version: 1.17 authors: tastybento