mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
builtinModulesJar fails a module that uses a VolmLib class Iris's Bukkit jar leaves out
This commit is contained in:
1 parent
0b02cb3298
commit
0d557da40f
2 files changed
+9
-2
No files matched your search
@@ -133,7 +133,9 @@ for further classes. The classes come from Iris core's compiled output, which th
|
||||
Before the jar lands in `build/libs`, `ModuleJarCheck` of IrisApi runs the class checks of a pack load on it,
|
||||
with the packages Iris exposes (`art.arcane.iris.builtin`, VolmLib's `art.arcane.volmlib` and Gson's
|
||||
`com.google.gson`, all three on the check's classpath); a listed class that uses Iris internals fails the task
|
||||
naming the class and what it uses. `check` runs the task.
|
||||
naming the class and what it uses. A VolmLib class that Iris's Bukkit jar strips (the list is Iris's
|
||||
`core/volmlib-left-out-of-bukkit-jar.txt`, which its shadowJar reads too) is on that classpath but missing on a
|
||||
server, so the check treats it as missing and fails the task naming it. `check` runs the task.
|
||||
|
||||
The jar holds `iris:post`, `iris:perfection` and `iris:matter`. They are written against IrisApi and
|
||||
`art.arcane.iris.builtin` alone: the chunk's `BlockState` hunk, the block registry's traits and `canPlaceOn`, the terrain
|
||||
|
||||
+6
-1
@@ -70,6 +70,8 @@ val builtinModuleEntryFile = "com.volmit.IrisModule"
|
||||
*/
|
||||
val exposedHostPackages = listOf("art.arcane.iris.builtin", "art.arcane.volmlib", "com.google.gson")
|
||||
val irisClasses = irisRoot.resolve("core/build/classes/java/main")
|
||||
/** The VolmLib classes Iris's Bukkit jar strips; Iris's shadowJar reads the same file. A module may not use them. */
|
||||
val volmLibLeftOutFile = irisRoot.resolve("core/volmlib-left-out-of-bukkit-jar.txt")
|
||||
val builtinModulesBuild = layout.buildDirectory.dir("builtin-modules")
|
||||
val checkedJarsDirectory = layout.buildDirectory.dir("libs")
|
||||
|
||||
@@ -131,7 +133,10 @@ val checkBuiltinModulesJar = tasks.register<JavaExec>("checkBuiltinModulesJar")
|
||||
classpath = irisApiForChecks + files(irisClasses)
|
||||
mainClass.set("com.volmit.host.ModuleJarCheck")
|
||||
javaLauncher.set(javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(25)) })
|
||||
argumentProviders.add(CommandLineArgumentProvider { listOf(packaged.get().asFile.absolutePath) + exposedHostPackages })
|
||||
inputs.file(volmLibLeftOutFile)
|
||||
argumentProviders.add(CommandLineArgumentProvider {
|
||||
listOf(packaged.get().asFile.absolutePath, "--left-out=${volmLibLeftOutFile.absolutePath}") + exposedHostPackages
|
||||
})
|
||||
isIgnoreExitValue = true
|
||||
val problems = ByteArrayOutputStream()
|
||||
errorOutput = problems
|
||||
|
||||
Reference in new issue
Block a user