Adopt packaging standard

- Ship the Bukkit runtime as a compact payload
- Drop packaging lines that now match the plugin defaults
- Verify native providers from PackedJar.readRuntime entries
- Remove the unused xz dependency from buildSrc
- Drop hand-written META-INF/maven excludes in mod builds
- Keep native boundary checks on in the mod adapters
This commit is contained in:
Brian Fopiano committed 2026-12-01 08:28:43 -05:00
1 parent 02f6379808
commit ba9694083b
7 files changed
+57 -67

No files matched your search

+7 -7
View File
@@ -1,5 +1,4 @@
import art.arcane.volmit.packaging.PackedJar
import art.arcane.volmit.packaging.PackagingMode
import art.arcane.volmit.packaging.NativeDevelopmentTargets
import io.papermc.paperweight.userdev.PaperweightUser
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
@@ -758,12 +757,8 @@ pluginPackaging {
packed = true
packedJarAccessors = ['art/arcane/iris/platform/bukkit/plugin/VolmitPlugin#getJarFile']
packedPayloadOnlyPrefixes = ['iris-language-guides/', 'META-INF/iris/generation-kernels/abi-', 'iris/icons/views/', 'iris/datapack/']
packedCompactPayload = true
packedMaximumBootstrapClasses = 90
stripDirectories = true
stripLocalVariables = true
releaseCompression = providers.gradleProperty('compactRelease')
.map { String value -> value.toBoolean() }
.getOrElse(!PackagingMode.resolve(providers).development())
prunePrefixes = ['art/arcane/volmlib/']
keepPrefixes = ['art/arcane/volmlib/util/matter/slices/', 'art/arcane/volmlib/nativelib/']
shrinkRules = [file('packaging/shrink.pro'), nativeRuntimeRules.get().asFile]
@@ -1010,7 +1005,12 @@ tasks.withType(PackedJar).configureEach {
dependsOn(tasks.named('verifyBukkitArtifact'), nativeRuntime)
nativeArtifacts.set(providers.provider { embeddedNatives() })
doLast { PackedJar task ->
NativeRuntimeArtifacts.verifyPacked(task.outputJar.get().asFile, nativeRuntimeModules, embeddedNatives())
File artifact = task.outputJar.get().asFile
Map<String, byte[]> outer = NativeRuntimeArtifacts.entries(artifact)
Map<String, byte[]> runtime = outer.containsKey('META-INF/volmit/runtime.properties')
? PackedJar.readRuntime(artifact.toPath()) : outer
NativeRuntimeArtifacts.verifyPacked(runtime, outer.get(NativeRuntimeArtifacts.MANIFEST), nativeRuntimeModules,
embeddedNatives())
}
}