Allow event handlers with non-void return type

Also removed unnecessary files from the Event Bus Proc JAR and
configured GPG signing as well as deployment to Sonatype OSSRH.
This commit is contained in:
2021-02-17 08:56:42 +01:00
parent ff35e7f37d
commit 4a5b94a9b7
6 changed files with 59 additions and 32 deletions

View File

@ -50,6 +50,21 @@
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>dev.kske:event-bus-core</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>

View File

@ -60,8 +60,6 @@ public class EventProcessor extends AbstractProcessor {
"Either the method or the annotation must define the event type");
else if (eventHandler.getParameters().size() > 1)
error(eventHandler, "Method must not have more than one parameter");
else if (eventHandler.getReturnType().getKind() != TypeKind.VOID)
error(eventHandler, "Method must return void");
else
pass = true;