diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a44be74..f221de2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,24 +1,23 @@ -name: SonarCloud +name: Build on: push: branches: - develop - - master pull_request: types: [opened, synchronize, reopened] jobs: build: - name: Build and analyze + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: 17 - distribution: 'zulu' # Alternative distribution options are available. + distribution: 'adopt' + java-version: '21' - name: Cache SonarCloud packages uses: actions/cache@v3 with: @@ -35,4 +34,11 @@ jobs: 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 -Dsonar.projectKey=BentoBoxWorld_TwerkingForTrees \ No newline at end of file + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_TwerkingForTrees + - run: mvn --batch-mode clean org.jacoco:jacoco-maven-plugin:prepare-agent install + - run: mkdir staging && cp target/*.jar staging + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: Package + path: staging \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4b1f6da..90163ef 100644 --- a/pom.xml +++ b/pom.xml @@ -207,7 +207,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.8.0 ${java.version} @@ -215,7 +215,39 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.0 + 3.0.0-M5 + + + ${argLine} + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.math=ALL-UNNAMED + --add-opens java.base/java.io=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens + java.base/java.util.stream=ALL-UNNAMED + --add-opens java.base/java.text=ALL-UNNAMED + --add-opens + java.base/java.util.regex=ALL-UNNAMED + --add-opens + java.base/java.nio.channels.spi=ALL-UNNAMED + --add-opens java.base/sun.nio.ch=ALL-UNNAMED + --add-opens java.base/java.net=ALL-UNNAMED + --add-opens + java.base/java.util.concurrent=ALL-UNNAMED + --add-opens java.base/sun.nio.fs=ALL-UNNAMED + --add-opens java.base/sun.nio.cs=ALL-UNNAMED + --add-opens java.base/java.nio.file=ALL-UNNAMED + --add-opens + java.base/java.nio.charset=ALL-UNNAMED + --add-opens + java.base/java.lang.reflect=ALL-UNNAMED + --add-opens + java.logging/java.util.logging=ALL-UNNAMED + --add-opens java.base/java.lang.ref=ALL-UNNAMED + --add-opens java.base/java.util.jar=ALL-UNNAMED + --add-opens java.base/java.util.zip=ALL-UNNAMED + + org.apache.maven.plugins @@ -225,19 +257,16 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.0.1 - ${java.version} - private - true false -Xdoclint:none ${java.home}/bin/javadoc + 16 attach-javadocs - package jar