mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Add PlatformStructures, the capability the structure importers read the platform through: templates, registered structures and structure sets, jigsaw structures, template pools with their connectors, and a closable capture area. The Bukkit host implements it in the plugin and takes over all reflection, the structure manager and the NMS calls; the importers keep only their model-building logic and report through the api sender. CommandContext.platformStructures() reaches it, ToolPlayer.targetBlock() lets a command read what the player looks at. CommandJigsaw, JigsawStudioBridge, IrisStructureHandler, the Director import and capture of CommandStructure and the modded stubs that explained the Bukkit workflow are replaced by the neutral jigsaw command tree in core/structure/tooling, mounted by StructureModelModule. Import and capture are now jigsaw sub-commands. The graph editor, the vanilla exporter and StructureIndexService speak api types: IrisObject hands out its contents as BlockState and BlockEntityData, exports go below ToolPack.outputFolder(), and the index writes through ToolPack.edit. The move lint is at 0 for the B2 set.
84 lines
4.5 KiB
Groovy
84 lines
4.5 KiB
Groovy
String apiVersion = providers.gradleProperty('apiVersion').get()
|
|
def mainClass = 'art.arcane.iris.Iris'
|
|
def bootstrapperClass = 'art.arcane.iris.IrisBootstrap'
|
|
|
|
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
|
.orElse('com.github.VolmitSoftware:VolmLib:e6574cf814b3dd670385a4d632a63fde2038e186')
|
|
.get()
|
|
|
|
dependencies {
|
|
compileOnly(project(':core'))
|
|
// The structure commands look up structures through the module's PackResources lookups; core shades the API.
|
|
compileOnly('com.volmit:iris-api')
|
|
compileOnly(libs.lombok)
|
|
annotationProcessor(libs.lombok)
|
|
compileOnly(volmLibCoordinate) {
|
|
transitive = false
|
|
}
|
|
compileOnly(libs.paper.api)
|
|
// LogFilterSVC (constructed in Iris.enable's explicit service list) implements the
|
|
// log4j-core Filter interface, so its constructor reference needs the type resolvable.
|
|
compileOnly(libs.log4j.core)
|
|
testImplementation('junit:junit:4.13.2')
|
|
testImplementation('org.mockito:mockito-core:5.23.0')
|
|
testImplementation(libs.paper.api)
|
|
testImplementation(libs.bstats)
|
|
testImplementation(libs.caffeine)
|
|
testImplementation(libs.paralithic)
|
|
testImplementation(project(':core'))
|
|
// Iris's objects are API placeable objects, so tests that read them compile against the API too.
|
|
testImplementation('com.volmit:iris-api')
|
|
testImplementation(volmLibCoordinate) {
|
|
transitive = false
|
|
}
|
|
compileOnly(libs.placeholderApi)
|
|
testImplementation(libs.placeholderApi) {
|
|
transitive = false
|
|
}
|
|
}
|
|
|
|
tasks.named('processResources').configure {
|
|
def pluginProperties = [
|
|
name : rootProject.name,
|
|
version : rootProject.version,
|
|
apiVersion: apiVersion,
|
|
main : mainClass,
|
|
bootstrapper: bootstrapperClass,
|
|
]
|
|
inputs.properties(pluginProperties)
|
|
filesMatching(['**/paper-plugin.yml', '**/plugin.yml']) {
|
|
expand(pluginProperties)
|
|
}
|
|
}
|
|
|
|
tasks.named('compileJava', JavaCompile).configure {
|
|
// lombok.config decides how equals/hashCode/toString are generated (fields, never getters), so editing it
|
|
// changes this module's bytecode. Gradle does not know that on its own and would serve a stale up-to-date
|
|
// build until something else in the module changed.
|
|
inputs.file(rootProject.file('lombok.config'))
|
|
.withPropertyName('lombokConfig')
|
|
.withPathSensitivity(PathSensitivity.NONE)
|
|
}
|
|
|
|
tasks.named('jar', Jar).configure {
|
|
archiveBaseName.set('iris-bukkit-plugin')
|
|
}
|
|
|
|
tasks.named('test').configure {
|
|
systemProperty('iris.commandFindSource', file('src/main/java/art/arcane/iris/core/commands/CommandFind.java').absolutePath)
|
|
systemProperty('iris.importCommandsSource', rootProject.file('core/src/main/java/art/arcane/iris/core/structure/tooling/ImportCommands.java').absolutePath)
|
|
systemProperty('iris.studioLifecycleCommandsSource', rootProject.file('core/src/main/java/art/arcane/iris/core/structure/tooling/StudioLifecycleCommands.java').absolutePath)
|
|
systemProperty('iris.commandIrisSource', file('src/main/java/art/arcane/iris/core/commands/CommandIris.java').absolutePath)
|
|
systemProperty('iris.bukkitChunkGeneratorSource', rootProject.file('core/src/main/java/art/arcane/iris/engine/platform/BukkitChunkGenerator.java').absolutePath)
|
|
systemProperty('iris.pregeneratorJobSource', rootProject.file('core/src/main/java/art/arcane/iris/core/gui/PregeneratorJob.java').absolutePath)
|
|
systemProperty('iris.bukkitEnginePlatformHooksSource', file('src/main/java/art/arcane/iris/core/runtime/BukkitEnginePlatformHooks.java').absolutePath)
|
|
systemProperty('iris.engineSvcSource', file('src/main/java/art/arcane/iris/core/service/IrisEngineSVC.java').absolutePath)
|
|
systemProperty('iris.jigsawStudioSvcSource', rootProject.file('core/src/main/java/art/arcane/iris/core/service/JigsawStudioService.java').absolutePath)
|
|
systemProperty('iris.studioSvcSource', rootProject.file('core/src/main/java/art/arcane/iris/core/service/StudioSVC.java').absolutePath)
|
|
systemProperty('iris.terrainSvcSource', file('src/main/java/art/arcane/iris/core/service/IrisTerrainSVC.java').absolutePath)
|
|
systemProperty('iris.apiEventSvcSource', file('src/main/java/art/arcane/iris/core/service/IrisApiEventSVC.java').absolutePath)
|
|
systemProperty('iris.worldInfoFactorySource', file('src/main/java/art/arcane/iris/core/service/terrain/IrisWorldInfoFactory.java').absolutePath)
|
|
systemProperty('iris.startupSource', file('src/main/java/art/arcane/iris/Iris.java').absolutePath)
|
|
systemProperty('iris.readmeSource', rootProject.file('README.md').absolutePath)
|
|
}
|