diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 20cda01..ae70141 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -68,3 +68,11 @@ configure { } tasks.named("processResources") { from(runtimeCatalogFile) { into("") } } + +// Keep the publishing artifact version with its catalog when bundled into a host JAR. +tasks.named("processResources") { + inputs.property("permissionManifestVersion", project.version.toString()) + filesMatching("META-INF/grounds/permissions/*.json") { + expand("version" to project.version.toString()) + } +} diff --git a/common/src/main/resources/META-INF/grounds/permissions.index b/common/src/main/resources/META-INF/grounds/permissions.index new file mode 100644 index 0000000..c82d8c8 --- /dev/null +++ b/common/src/main/resources/META-INF/grounds/permissions.index @@ -0,0 +1 @@ +META-INF/grounds/permissions/plugin-grounds-runtime.json diff --git a/common/src/main/resources/META-INF/grounds/permissions/plugin-grounds-runtime.json b/common/src/main/resources/META-INF/grounds/permissions/plugin-grounds-runtime.json new file mode 100644 index 0000000..07ff034 --- /dev/null +++ b/common/src/main/resources/META-INF/grounds/permissions/plugin-grounds-runtime.json @@ -0,0 +1,16 @@ +{ + "source": "plugin-grounds-runtime", + "permissions": [ + { + "key": "grounds.runtime.info", + "label": "Inspect runtime information", + "description": "View runtime and installed library information.", + "supportedScopes": [ + "GLOBAL", + "SERVER_TYPE", + "SERVER" + ] + } + ], + "sourceVersion": "${version}" +}