Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/maven/org.apache.maven.surefire…
Browse files Browse the repository at this point in the history
…-surefire-junit-platform-3.5.0
  • Loading branch information
stefvanschie authored Nov 20, 2024
2 parents b2de075 + 8f4c16f commit 340fa92
Show file tree
Hide file tree
Showing 67 changed files with 4,270 additions and 156 deletions.
10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21"
directory: "/nms/1_21_0"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21_1"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21_2-3"
schedule:
interval: "daily"
- package-ecosystem: "maven"
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
mvn paper-nms:init -pl nms/1_20_1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3-4
- name: 'Run BuildTools 1.20.5-1.20.6, 1.21.1'
- name: 'Run BuildTools 1.20.5-1.20.6, 1.21'
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p build
Expand Down Expand Up @@ -105,7 +105,27 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
cd ../
- name: Setup GPG keys
run: cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
mvn paper-nms:init -pl nms/1_20_1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3-4
- name: 'Run BuildTools 1.20.5-1.20.6, 1.21.1'
- name: 'Run BuildTools 1.20.5-1.20.6, 1.21'
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p build
Expand Down Expand Up @@ -111,7 +111,27 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
cd ../
- name: Build with Maven
run: mvn -B package --file pom.xml
20 changes: 16 additions & 4 deletions IF/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -169,7 +169,19 @@
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21</artifactId>
<artifactId>1_21_0</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21_1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21_2-3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
Expand Down Expand Up @@ -267,12 +279,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<version>3.5.0</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform </artifactId>
<version>3.5.0</version>
<version>3.5.2</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,33 @@ public enum Version {
V1_20_6,

/**
* Version 1.21
* Version 1.21.0
*
* @since 0.10.15
* @since 0.10.18
*/
V1_21;
V1_21_0,

/**
* Version 1.21.1
*
* @since 0.10.18
*/
V1_21_1,

/**
* Version 1.21.2 - 1.21.3
*
* @since 0.10.18
*/
V1_21_2_3;

/**
* A collection of versions on which modern smithing tables are available.
*/
private static final Collection<Version> MODERN_SMITHING_TABLE_VERSIONS = EnumSet.of(
V1_19_4,
V1_20_0, V1_20_1, V1_20_2, V1_20_3_4, V1_20_5, V1_20_6,
V1_21
V1_21_0, V1_21_1, V1_21_2_3
);

/**
Expand All @@ -192,6 +206,14 @@ public enum Version {
V1_19_0, V1_19_1, V1_19_2, V1_19_3, V1_19_4
);

/**
* A collection of versions on which {@link InventoryView} is an interface.
*/
@NotNull
private static final Collection<@NotNull Version> INTERFACE_INVENTORY_VIEW = EnumSet.of(
V1_21_0, V1_21_1, V1_21_2_3
);

/**
* Checks whether the {@link InventoryView} class is an interface on this version.
*
Expand All @@ -200,7 +222,7 @@ public enum Version {
*/
@Contract(pure = true)
public boolean isInventoryViewInterface() {
return this == Version.V1_21;
return INTERFACE_INVENTORY_VIEW.contains(this);
}

/**
Expand Down Expand Up @@ -289,8 +311,12 @@ public static Version getVersion() {
case "1.20.6":
return V1_20_6;
case "1.21":
return V1_21_0;
case "1.21.1":
return V1_21;
return V1_21_1;
case "1.21.2":
case "1.21.3":
return V1_21_2_3;
default:
throw new UnsupportedVersionException("The server version provided is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -363,8 +367,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -409,8 +417,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -455,8 +467,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -501,8 +517,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -547,8 +567,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -565,8 +589,12 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -639,7 +667,11 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_5.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.StonecutterInventoryImpl.class);
}
}
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To add this project as a dependency to your pom.xml, add the following to your p
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>IF</artifactId>
<version>0.10.17</version>
<version>0.10.18</version>
</dependency>
```
The project is in the Central Repository, so specifying a repository is not needed.
Expand Down Expand Up @@ -50,7 +50,7 @@ Replace [YOUR PACKAGE] with the top-level package of your project.
To add this project as a dependency for your Gradle project, make sure your `dependencies` section of your build.gradle looks like the following:
```Groovy
dependencies {
implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.17'
implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.18'
// ...
}
```
Expand Down Expand Up @@ -142,10 +142,10 @@ mvn paper-nms:init -pl nms/1_20_3-4
```

### Installing Spigot via BuildTools
For versions 1.20.5-1.20.6, we use BuildTools. To install these versions, we run the following commands.
For versions 1.20.5-1.21.3, we use BuildTools. To install these versions, we run the following commands.
```
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
git clone https://hub.spigotmc.org/stash/scm/spigot/bukkit.git Bukkit
cd Bukkit
git checkout 304e83eb384c338546aa96eea51388e0e8407e26
Expand All @@ -167,9 +167,27 @@ git checkout a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
```

Your environment is now set up correctly. To create a build, run the following inside the root folder of the project.
Expand Down
2 changes: 1 addition & 1 deletion adventure-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit 340fa92

Please sign in to comment.