Skip to content

Commit

Permalink
release: version 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Mar 24, 2021
1 parent 974c11e commit a06f1d1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ Generates the event implementations and factory for SpongeAPI based on event
templates formatted as Java interfaces using [Spoon](https://github.com/INRIA/spoon).

## Usage
You can use `event-impl-gen` in your plugins to generate event implementations based on event interfaces.
You can use `event-impl-gen` in your plugins to generate event implementations based on event interfaces. `event-impl-gen` is primarily tested on
Gradle 6+, but should work on 5.6.4 and up.
To use it in your plugin, you need to apply it to your Gradle build script:

```gradle
plugins {
id 'org.spongepowered.event-impl-gen' version '5.3.0'
id("org.spongepowered.gradle.event-impl-gen") version "7.0.0"
}
genEventImpl {
// The full qualified class name of the factory
outputFactory = 'com.example.myplugin.event.factory.MyPluginEventFactory'
outputFactory = "com.example.myplugin.event.factory.MyPluginEventFactory"
// The path to your event interfaces
include 'com/example/myplugin/event/'
include "com/example/myplugin/event/"
}
```

Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ dependencies {
}

indraPluginPublishing {
pluginIdBase = "${project.group}.gradle"
plugin(
"event-impl-gen",
"org.spongepowered.eventimplgen.EventImplGenPlugin",
"Sponge Event Implementation Generator",
project.description,
["minecraft", "sponge"]
"event-impl-gen",
"org.spongepowered.eventimplgen.EventImplGenPlugin",
"Sponge Event Implementation Generator",
project.description,
["minecraft", "sponge"]
)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=event-impl-gen
version=7.0.0-SNAPSHOT
version=7.0.0
projectName=Event Implementation Generator
description=SpongeAPI code generation for events
url=https://www.spongepowered.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void testProject() {
final Project project = ProjectBuilder.builder().build();

project.getPlugins().apply("java-library");
project.getPlugins().apply("org.spongepowered.event-impl-gen");
project.getPlugins().apply("org.spongepowered.gradle.event-impl-gen");

// Basic task application
assertNotNull(project.getTasks().findByName("genEventImpl"));
Expand Down

0 comments on commit a06f1d1

Please sign in to comment.