Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@ on:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
name: Build and test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up JDK 25
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
distribution: 'temurin'
java-version: 25
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
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
# Build, run the tests and generate the JaCoCo coverage report (target/site/jacoco/jacoco.xml).
# There is no SonarQube Cloud project for this addon yet, so the code is not analyzed.
- name: Build and test
run: mvn -B verify
6 changes: 3 additions & 3 deletions .github/workflows/modrinth-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# 2. Set up Java 21 (required by Biomes' build)
- name: Set up Java 21
# 2. Set up Java 25 (required by Biomes' build)
- name: Set up Java 25
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'

# 3. Cache Maven dependencies to speed up builds
Expand Down
27 changes: 17 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version>
<java.version>25</java.version>
<!-- Test dependency versions -->
<junit.version>5.10.2</junit.version>
<mockito.version>5.11.0</mockito.version>
<mock-bukkit.version>v1.21-SNAPSHOT</mock-bukkit.version>
<mockito.version>5.20.0</mockito.version>
<mock-bukkit.version>4.119.0</mock-bukkit.version>
<!-- More visible way how to change dependency versions -->
<paper.version>1.21.11-R0.1-SNAPSHOT</paper.version>
<bentobox.version>3.14.0</bentobox.version>
<paper.version>26.3.build.231-stable</paper.version>
<bentobox.version>3.25.0-SNAPSHOT</bentobox.version>
<bank.version>1.4.0</bank.version>
<level.version>2.5.0</level.version>
<greenhouses.version>1.9.2</greenhouses.version>
Expand All @@ -55,7 +55,7 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>2.3.3</build.version>
<build.version>2.4.0</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Biomes</sonar.projectKey>
Expand Down Expand Up @@ -119,6 +119,13 @@
<id>bentoboxworld</id>
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
</repository>
<!-- BentoBox snapshots (Gradle publishes here, note .io vs .org) -->
<repository>
<id>bentoboxworld-snapshots</id>
<url>https://repo.codemc.io/repository/bentoboxworld/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.org/repository/maven-public/</url>
Expand Down Expand Up @@ -178,8 +185,8 @@
</dependency>
<!-- MockBukkit -->
<dependency>
<groupId>com.github.MockBukkit</groupId>
<artifactId>MockBukkit</artifactId>
<groupId>org.mockbukkit.mockbukkit</groupId>
<artifactId>mockbukkit-v26.3</artifactId>
<version>${mock-bukkit.version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -337,7 +344,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.2</version>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
Expand Down Expand Up @@ -379,7 +386,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.15</version>
<configuration>
<append>true</append>
<excludes>
Expand Down
Loading
Loading