Skip to content

Commit d9ae27b

Browse files
committed
Adds boilerplate code for 1.21 support (yes, this doesn't compile, soz)
1 parent 9c9676a commit d9ae27b

File tree

7 files changed

+1288
-1
lines changed

7 files changed

+1288
-1
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright 2024 Jorel Ali (Skepter) - MIT License Permission is
3+
hereby granted, free of charge, to any person obtaining a copy of this software
4+
and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy,
6+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
7+
Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions: The above copyright notice and this
9+
permission notice shall be included in all copies or substantial portions
10+
of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
11+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
13+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
14+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16+
DEALINGS IN THE SOFTWARE. -->
17+
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<parent>
22+
<artifactId>commandapi-bukkit-nms</artifactId>
23+
<groupId>dev.jorel</groupId>
24+
<version>9.5.0-SNAPSHOT</version>
25+
</parent>
26+
<modelVersion>4.0.0</modelVersion>
27+
28+
<artifactId>commandapi-bukkit-1.21</artifactId>
29+
30+
<properties>
31+
<minecraft.mappings>1.21-R0.1-SNAPSHOT</minecraft.mappings>
32+
<spigot.version>1.21-R0.1-SNAPSHOT</spigot.version>
33+
<paper.version>1.21-R0.1-SNAPSHOT</paper.version>
34+
</properties>
35+
36+
<repositories>
37+
<repository>
38+
<id>minecraft-libraries</id>
39+
<url>https://libraries.minecraft.net</url>
40+
</repository>
41+
<repository>
42+
<id>codemc-repo</id>
43+
<url>https://repo.codemc.io/repository/nms/</url>
44+
</repository>
45+
<repository>
46+
<id>papermc</id>
47+
<url>https://papermc.io/repo/repository/maven-public/</url>
48+
</repository>
49+
</repositories>
50+
51+
<dependencies>
52+
<!-- Spigot testing (for reflection checks) -->
53+
54+
<dependency>
55+
<groupId>org.spigotmc</groupId>
56+
<artifactId>spigot</artifactId>
57+
<version>${spigot.version}</version>
58+
<scope>test</scope>
59+
</dependency>
60+
<!-- Spigot compilation -->
61+
<dependency>
62+
<groupId>org.spigotmc</groupId>
63+
<artifactId>spigot</artifactId>
64+
<version>${spigot.version}</version>
65+
<classifier>remapped-mojang</classifier>
66+
<scope>provided</scope>
67+
</dependency>
68+
<!-- Libraries -->
69+
<dependency>
70+
<groupId>io.papermc.paper</groupId>
71+
<artifactId>paper-api</artifactId>
72+
<version>${paper.version}</version>
73+
<scope>provided</scope>
74+
</dependency>
75+
76+
<!-- CommandAPI core -->
77+
<dependency>
78+
<groupId>dev.jorel</groupId>
79+
<artifactId>commandapi-bukkit-core</artifactId>
80+
<version>${project.version}</version>
81+
<scope>compile</scope>
82+
</dependency>
83+
84+
<dependency>
85+
<groupId>dev.jorel</groupId>
86+
<artifactId>commandapi-bukkit-nms-common</artifactId>
87+
<version>${project.version}</version>
88+
<classifier>mojang-mapped</classifier>
89+
<scope>provided</scope>
90+
</dependency>
91+
</dependencies>
92+
93+
<build>
94+
<plugins>
95+
<!-- Generate Mojang mapped jar -->
96+
<plugin>
97+
<groupId>org.apache.maven.plugins</groupId>
98+
<artifactId>maven-jar-plugin</artifactId>
99+
<executions>
100+
<execution>
101+
<id>Mojang-Mapped</id>
102+
<goals>
103+
<goal>jar</goal>
104+
</goals>
105+
<configuration>
106+
<classifier>mojang-mapped</classifier>
107+
</configuration>
108+
</execution>
109+
</executions>
110+
</plugin>
111+
<!-- Generate Spigot mapped jar -->
112+
<plugin>
113+
<groupId>net.md-5</groupId>
114+
<artifactId>specialsource-maven-plugin</artifactId>
115+
<version>2.0.2</version>
116+
<executions>
117+
<execution>
118+
<phase>package</phase>
119+
<goals>
120+
<goal>remap</goal>
121+
</goals>
122+
<id>remap-obf</id>
123+
<configuration>
124+
<srgIn>org.spigotmc:minecraft-server:${minecraft.mappings}:txt:maps-mojang</srgIn>
125+
<reverse>true</reverse>
126+
<remappedDependencies>org.spigotmc:spigot:${minecraft.mappings}:jar:remapped-mojang</remappedDependencies>
127+
<remappedArtifactAttached>true</remappedArtifactAttached>
128+
<remappedClassifierName>remapped-obf</remappedClassifierName>
129+
</configuration>
130+
</execution>
131+
<execution>
132+
<phase>package</phase>
133+
<goals>
134+
<goal>remap</goal>
135+
</goals>
136+
<id>remap-spigot</id>
137+
<configuration>
138+
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
139+
<srgIn>org.spigotmc:minecraft-server:${minecraft.mappings}:csrg:maps-spigot</srgIn>
140+
<remappedDependencies>org.spigotmc:spigot:${minecraft.mappings}:jar:remapped-obf</remappedDependencies>
141+
</configuration>
142+
</execution>
143+
</executions>
144+
</plugin>
145+
<!-- Allow code coverage -->
146+
<plugin>
147+
<groupId>org.jacoco</groupId>
148+
<artifactId>jacoco-maven-plugin</artifactId>
149+
<executions>
150+
<execution>
151+
<id>default-prepare-agent</id>
152+
<goals>
153+
<goal>prepare-agent</goal>
154+
</goals>
155+
</execution>
156+
<execution>
157+
<id>report</id>
158+
<phase>verify</phase>
159+
<goals>
160+
<goal>report</goal>
161+
</goals>
162+
</execution>
163+
</executions>
164+
</plugin>
165+
</plugins>
166+
</build>
167+
</project>

0 commit comments

Comments
 (0)