AddonExtension

abstract class AddonExtension @Inject constructor(project: Project, objects: ObjectFactory)

Contains configuration options for the addonJar task.

Constructors

Link copied to clipboard
@Inject
constructor(project: Project, objects: ObjectFactory)

Properties

Link copied to clipboard

Whether the addonJar output should be added to Origami's run-server plugins. Defaults to true.

Link copied to clipboard
abstract val authors: ListProperty<String>

(optional) A list of authors of the addon.

Link copied to clipboard
abstract val bootstrapper: Property<String>

(optional) The path to the PluginBootstrap implementation. (e.g. com.example.MyBootstrapper)

Link copied to clipboard
abstract val contributors: ListProperty<String>

(optional) A list of contributors of the addon.

Link copied to clipboard
abstract val dependencies: ListProperty<PluginDependency>

(optional) A list of plugin dependencies.

Link copied to clipboard
abstract val description: Property<String>

(optional) A description of the addon.

Link copied to clipboard
val destination: DirectoryProperty

The destination directory of the addonJar task.

Link copied to clipboard
val fileName: Property<String>

The file name of the jar produced by the addonJar task.

Link copied to clipboard
val input: Property<CopySpec>

The CopySpec to merge into addonJar.

Link copied to clipboard
abstract val loader: Property<String>

(optional) The path to the PluginLoader implementation.

Link copied to clipboard
abstract val main: Property<String>

The path to the addons main class, e.g. com.example.MyAddon. The main class needs to be a singleton object extending xyz.xenondevs.nova.addon.Addon.

Link copied to clipboard
abstract val name: Property<String>

The name of the addon. The lowercase version is used as the addon's id (namespace).

Link copied to clipboard
val novaDev: Property<Boolean>

Whether Nova development mode should be enabled for Origami run-server tasks. Adds the -DNovaDev JVM argument when enabled. Defaults to true.

Link copied to clipboard
abstract val pluginMain: Property<String>

(optional) The path to the JavaPlugin implementation.

Link copied to clipboard
abstract val prefix: Property<String>

(optional) The prefix of the addon. Used for logging.

Link copied to clipboard
abstract val version: Property<String>

The version of the addon. This is parsed using xenondevs' commons-version and needs to be valid according to that.

Link copied to clipboard
abstract val website: Property<String>

(optional) The website of the addon.

Functions

Link copied to clipboard
fun dependency(name: String, load: PluginDependency.Load = Load.OMIT, required: Boolean = true, joinClasspath: Boolean = true)

Creates a dependency on a plugin named name in both the Stage.BOOTSTRAP and Stage.SERVER stages. The load order is defined by load, the plugin will require the dependency if required is true, and the plugin's classes will be accessible if joinClasspath is true.

fun dependency(name: String, stage: PluginDependency.Stage, load: PluginDependency.Load = Load.OMIT, required: Boolean = true, joinClasspath: Boolean = true)

Creates a dependency on a plugin named name in the specified stage. The load order is defined by load, the plugin will require the dependency if required is true, and the plugin's classes will be accessible if joinClasspath is true.