SpongePowered/event-impl-gen

Name: event-impl-gen

Owner: SpongePowered

Description: Used for generating SpongeEventFactory in SpongeAPI

Created: 2015-08-29 19:37:31.0

Updated: 2017-03-07 09:54:18.0

Pushed: 2018-04-24 05:24:19.0

Homepage: null

Size: 296

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Event Implementation Generator

Generates the event implementations and factory for SpongeAPI based on event templates formatted as Java interfaces using Spoon.

Usage

You can use event-impl-gen in your plugins to generate event implementations based on event interfaces. To use it in your plugin, you need to apply it to your Gradle build script:

ins {
id 'org.spongepowered.event-impl-gen' version '5.0.2'


ventImpl {
// The full qualified class name of the factory
outputFactory = 'com.example.myplugin.event.factory.MyPluginEventFactory'
// The path to your event interfaces
include 'com/example/myplugin/event/'

Gradle will automatically generate the event factory when building your plugin. However, if you want to import your project into the IDE, you must run the task manually. To generate the event factory manually, run the genEventImpl Gradle task.

By default, the jar task of your project is automatically configured to include the generated event factory. However, if you have a custom jar task you have to include the classes manually:

 myCustomJar(type: Jar) {
// ...
from tasks.genEventImpl

If you are using the shadow plugin, the event factory should be also included automatically.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.