diff --git a/.travis.yml b/.travis.yml
index 5051d49..9a05a85 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,38 @@
language: java
-jdk:
- - oraclejdk8
- - openjdk8
- - oraclejdk9
- - openjdk10
+dist: trusty
+
before_install:
- chmod +x gradlew
-script:
-- ./gradlew test
-- ./gradlew jacocoTestReport
+before_script:
+- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
+
+jobs:
+ include:
+ - stage: jdk.java.net - OpenJDK - GPL
+ env: JDK=8
+ script:
+ - jdk_switcher use openjdk8
+ - ./gradlew test
+ - ./gradlew jacocoTestReport
+ - # stage: ...
+ env: JDK=9
+ script:
+ - source install-jdk.sh -C -F 9
+ - ./gradlew test
+ - ./gradlew jacocoTestReport
+ - # stage: ...
+ env: JDK=10
+ script:
+ - source install-jdk.sh -C -F 10
+ - ./gradlew test
+ - ./gradlew jacocoTestReport
+
+
after_success:
-- bash <(curl -s https://codecov.io/bash)
\ No newline at end of file
+- bash <(curl -s https://codecov.io/bash)
+
+after_script:
+- echo JAVA_HOME = ${JAVA_HOME}
+- echo PATH = ${PATH}
+- ls ${JAVA_HOME}
+- java -version
\ No newline at end of file
diff --git a/LICENSE_HEADER b/LICENSE_HEADER
index 6c8053b..ad0340b 100644
--- a/LICENSE_HEADER
+++ b/LICENSE_HEADER
@@ -1,4 +1,4 @@
- Copyright 2018 Club Obsidian and contributors.
+ Copyright 2019 Club Obsidian and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 1d8e006..0769409 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,25 @@
-![trident](/img/trident_logo.png)
+# Trident
[![Build Status](https://api.travis-ci.org/ClubObsidian/trident.svg?branch=master)](https://travis-ci.org/ClubObsidian/trident)
[![build artifacts](https://jitpack.io/v/clubobsidian/trident.svg)](https://jitpack.io/#clubobsidian/trident)
[![codecov](https://codecov.io/gh/ClubObsidian/trident/branch/master/graph/badge.svg)](https://codecov.io/gh/ClubObsidian/trident)
+[![Known Vulnerabilities](https://snyk.io//test/github/ClubObsidian/trident/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/ClubObsidian/trident?targetFile=build.gradle)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
-[![discord](https://discordapp.com/api/guilds/482823104905609248/widget.png)](https://discord.gg/EY5Tq6r)
-[Javadocs](https://jitpack.io/com/github/clubobsidian/trident/1.0.8/javadoc/)
+[![Discord](https://img.shields.io/discord/482823104905609248.svg?logo=discord)](https://discord.gg/EY5Tq6r)
+[![javadocs](https://img.shields.io/badge/Javadocs-2.0.0-success.svg)](https://jitpack.io/com/github/clubobsidian/trident/2.0.0/javadoc/)
-A dead simpile annotation event system that allows different event executor implementations.
+A dead simpile annotation-based event bus that allows different event executor implementations.
Trident implements reflection and generated Javassist method executors.
+## Inspiration
+
+Inspiration for Trident.
+
+* [Event4j](https://github.com/Techcable/Event4J)
+* [Guava](https://github.com/google/guava)
+* [mbassador](https://github.com/bennidi/mbassador)
+
## Build Artifacts
Build artifacts are hosted via [Jitpack.](https://jitpack.io/#clubobsidian/Trident/)
@@ -24,7 +33,7 @@ repositories {
maven { url 'https://jitpack.io' }
}
-compile 'com.github.clubobsidian:trident:1.1.0'
+compile 'com.github.clubobsidian:trident:2.0.0'
```
### Maven
@@ -40,13 +49,13 @@ compile 'com.github.clubobsidian:trident:1.1.0'
com.github.clubobsidian
trident
- 1.1.0
+ 2.0.0
```
## Dependencies
-* Javassist
+* [Javassist](https://github.com/jboss-javassist/javassist)
## Development
diff --git a/build.gradle b/build.gradle
index c0b7df7..eb2af46 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,33 +1,32 @@
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
- }
+plugins {
+ id 'java'
+ id 'com.github.johnrengelman.shadow' version '5.0.0'
+ id 'jacoco'
+ id 'eclipse'
+ id 'idea'
}
-apply plugin: 'java'
-apply plugin: 'com.github.johnrengelman.shadow'
-apply plugin: 'jacoco'
-apply plugin: 'eclipse'
-apply plugin: 'idea'
-
-
sourceCompatibility = 1.8
targetCompatibility = 1.8
+group = 'com.clubobsidian'
+version = '2.0.0'
+
repositories {
mavenCentral()
jcenter()
}
+configurations {
+ shade
+ compile.extendsFrom shade
+}
+
shadowJar {
baseName = 'trident'
classifier = null
- version = null
relocate 'javassist', 'com.clubobsidian.trident.javassist'
}
@@ -38,10 +37,11 @@ dependencies {
}
jacocoTestReport {
- reports {
- xml.enabled true
- html.enabled false
- }
+ reports {
+ xml.enabled true
+ html.enabled false
+ html.destination file("${buildDir}/jacocoHtml")
+ }
}
task javadocJar(type: Jar, dependsOn: javadoc) {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 16d2805..f4d7b2b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/src/main/java/com/clubobsidian/trident/Cancelable.java b/src/main/java/com/clubobsidian/trident/Cancelable.java
index f5eefc1..ac8bcde 100644
--- a/src/main/java/com/clubobsidian/trident/Cancelable.java
+++ b/src/main/java/com/clubobsidian/trident/Cancelable.java
@@ -1,5 +1,5 @@
/*
- Copyright 2018 Club Obsidian and contributors.
+ Copyright 2019 Club Obsidian and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/clubobsidian/trident/Event.java b/src/main/java/com/clubobsidian/trident/Event.java
index 68d4771..b6c209f 100644
--- a/src/main/java/com/clubobsidian/trident/Event.java
+++ b/src/main/java/com/clubobsidian/trident/Event.java
@@ -1,5 +1,5 @@
/*
- Copyright 2018 Club Obsidian and contributors.
+ Copyright 2019 Club Obsidian and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/clubobsidian/trident/EventManager.java b/src/main/java/com/clubobsidian/trident/EventBus.java
similarity index 81%
rename from src/main/java/com/clubobsidian/trident/EventManager.java
rename to src/main/java/com/clubobsidian/trident/EventBus.java
index 6958b74..09ef21d 100644
--- a/src/main/java/com/clubobsidian/trident/EventManager.java
+++ b/src/main/java/com/clubobsidian/trident/EventBus.java
@@ -1,5 +1,5 @@
/*
- Copyright 2018 Club Obsidian and contributors.
+ Copyright 2019 Club Obsidian and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,21 +22,22 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
+import com.clubobsidian.trident.event.DeadEvent;
import com.clubobsidian.trident.util.ClassUtil;
import com.clubobsidian.trident.util.EventDoublyLinkedList;
import com.clubobsidian.trident.util.EventNode;
/**
- * Abstract class for implementing EventManager
- * classes. For an example see @see com.clubobsidian.trident.impl.javaassist.JavaAssistEventManager
+ * Abstract class for implementing EventBus
+ * classes. For an example see @see com.clubobsidian.trident.impl.javaassist.JavaAssistEventBus
*
* @author virustotalop
*/
-public abstract class EventManager {
+public abstract class EventBus {
- private Map> registeredEventListeners;
+ private Map