Skip to content

Commit 29e8534

Browse files
committed
feat: update project version to 1.1.0-SNAPSHOT and enhance dependency management with MockBukkit integration
1 parent 55b1c7e commit 29e8534

1 file changed

Lines changed: 45 additions & 3 deletions

File tree

pom.xml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.pinont</groupId>
88
<artifactId>singularitylib</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.1.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SingularityLib</name>
@@ -52,7 +52,9 @@
5252

5353
<properties>
5454
<java.version>23</java.version>
55-
<paperapi.version>1.21.5-R0.1-SNAPSHOT</paperapi.version>
55+
<paperapi.version>1.21.8-R0.1-SNAPSHOT</paperapi.version>
56+
<mockbukkit.version>4.87.0</mockbukkit.version>
57+
<paper.version.from.mockbukkit>${paperapi.version}</paper.version.from.mockbukkit>
5658
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5759
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5860
<maven.compiler.release>${java.version}</maven.compiler.release>
@@ -135,6 +137,40 @@
135137
<artifactId>maven-deploy-plugin</artifactId>
136138
<version>3.1.2</version>
137139
</plugin>
140+
141+
142+
<plugin>
143+
<groupId>org.codehaus.gmaven</groupId>
144+
<artifactId>groovy-maven-plugin</artifactId>
145+
<version>2.1.1</version>
146+
<executions>
147+
<execution>
148+
<phase>initialize</phase>
149+
<goals>
150+
<goal>execute</goal>
151+
</goals>
152+
<configuration>
153+
<source>
154+
// Extract Paper version from MockBukkit JAR
155+
def mockbukkitJar = project.artifacts.find {
156+
it.artifactId.startsWith('mockbukkit-')
157+
}?.file
158+
159+
if (mockbukkitJar) {
160+
def jar = new java.util.jar.JarFile(mockbukkitJar)
161+
def manifest = jar.manifest
162+
def paperVersion = manifest.mainAttributes.getValue('Paper-Version')
163+
jar.close()
164+
165+
if (paperVersion) {
166+
project.properties['paper.version.from.mockbukkit'] = paperVersion
167+
}
168+
}
169+
</source>
170+
</configuration>
171+
</execution>
172+
</executions>
173+
</plugin>
138174
</plugins>
139175

140176
<resources>
@@ -176,7 +212,13 @@
176212
<dependency>
177213
<groupId>org.mockbukkit.mockbukkit</groupId>
178214
<artifactId>mockbukkit-v1.21</artifactId>
179-
<version>4.77.0</version>
215+
<version>${mockbukkit.version}</version>
216+
<scope>test</scope>
217+
</dependency>
218+
<dependency>
219+
<groupId>io.papermc.paper</groupId>
220+
<artifactId>paper-api</artifactId>
221+
<version>${paper.version.from.mockbukkit}</version>
180222
<scope>test</scope>
181223
</dependency>
182224
<dependency>

0 commit comments

Comments
 (0)