From 0992a4fc52019a05be3ad20218a21cb9adee428b Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 20 Jun 2021 10:52:48 -0700 Subject: [PATCH] Java 16 and Sonar Cloud --- .github/ISSUE_TEMPLATE/bug_report.md | 33 -------------------- .github/ISSUE_TEMPLATE/feature_request.md | 17 ----------- .github/workflows/build.yml | 37 +++++++++++++++++++++++ .travis.yml | 17 ----------- pom.xml | 13 ++++---- 5 files changed, 43 insertions(+), 74 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index b10469f..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Description** -A clear and concise description of what the bug is. - -**Steps to reproduce the behavior:** -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Server Information:** - -[Please complete the following information:] - - Database being used (YAML, JSON, MySQL, MongoDB): [] - - OS: [e.g. iOS] - - Java Version: [e.g. Java 8] - - BentoBox version: [e.g. 1.7.2.21] - - Addons installed? [Do '/bentobox version' and copy/paste from the console] - - Other plugins? [Do '/plugins' and copy/paste from the console] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. 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 85aad81..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: java -sudo: false -addons: - sonarcloud: - organization: "bentobox-world" - -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_Limits - -cache: - directories: - - '$HOME/.m2/repository' - - '$HOME/.sonar/cache' diff --git a/pom.xml b/pom.xml index 27f8db4..0dc3480 100644 --- a/pom.xml +++ b/pom.xml @@ -53,12 +53,12 @@ UTF-8 UTF-8 - 1.8 + 16 - 2.0.2 + 2.0.9 - 1.16.3-R0.1-SNAPSHOT - 1.15.4 + 1.17-R0.1-SNAPSHOT + 1.17.0-SNAPSHOT ${build.version}-SNAPSHOT @@ -160,7 +160,7 @@ org.mockito mockito-core - 3.0.0 + 3.11.1 test @@ -222,8 +222,7 @@ maven-compiler-plugin 3.7.0 - ${java.version} - ${java.version} + ${java.version}