diff --git a/README.md b/README.md index 928a612b6..3c3ad9e5f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index 1a888f0f4..daafabe83 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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("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