diff --git a/build.gradle b/build.gradle index 37222bf..bc0b735 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ plugins { id 'net.neoforged.gradleutils' version '[2.0.18,)' id 'com.github.ben-manes.versions' version '0.42.0' id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' + id 'net.neoforged.licenser' version '0.7.2' apply false } apply plugin: 'maven-publish' @@ -15,7 +16,8 @@ allprojects { apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'de.jjohannes.extra-java-module-info' - + apply plugin: 'net.neoforged.licenser' + group 'net.neoforged' java { toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -62,6 +64,12 @@ allprojects { } } } + + license { + header = rootProject.file("codeformat/HEADER.txt") + skipExistingHeaders = true + include '**/*.java' + } } changelog { @@ -158,4 +166,4 @@ if (System.getenv('GPG_PRIVATE_KEY')) { useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications.mavenJava } -} \ No newline at end of file +} diff --git a/bus-jmh/src/main/java/module-info.java b/bus-jmh/src/main/java/module-info.java index 32d1b12..3726596 100644 --- a/bus-jmh/src/main/java/module-info.java +++ b/bus-jmh/src/main/java/module-info.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + open module net.neoforged.bus.jmh { requires org.junit.jupiter.api; requires org.apache.logging.log4j; diff --git a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/FewListenersBenchmark.java b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/FewListenersBenchmark.java index 1c30e3b..992e818 100644 --- a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/FewListenersBenchmark.java +++ b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/FewListenersBenchmark.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks; import net.neoforged.bus.benchmarks.compiled.BenchmarkArmsLength; diff --git a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyBussesBenchmark.java b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyBussesBenchmark.java index 2432aa9..566264e 100644 --- a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyBussesBenchmark.java +++ b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyBussesBenchmark.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks; import net.neoforged.bus.api.*; diff --git a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyDifferentListenersBenchmark.java b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyDifferentListenersBenchmark.java index 90e871f..667ae1d 100644 --- a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyDifferentListenersBenchmark.java +++ b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyDifferentListenersBenchmark.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks; import net.neoforged.bus.api.*; diff --git a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyListenersBenchmark.java b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyListenersBenchmark.java index cca308d..8188b05 100644 --- a/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyListenersBenchmark.java +++ b/bus-jmh/src/main/java/net/neoforged/bus/benchmarks/ManyListenersBenchmark.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks; import net.neoforged.bus.api.*; diff --git a/bus-test/src/test/java/module-info.java b/bus-test/src/test/java/module-info.java index 4b30f05..e0f3d26 100644 --- a/bus-test/src/test/java/module-info.java +++ b/bus-test/src/test/java/module-info.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + open module net.neoforged.bus.test { requires org.junit.jupiter.api; requires org.apache.logging.log4j; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/ITestHandler.java b/bus-test/src/test/java/net/neoforged/bus/test/ITestHandler.java index 2f66461..4895d0d 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/ITestHandler.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/ITestHandler.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test; import java.util.function.Supplier; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoader.java b/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoader.java index 95e26f1..9c29580 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoader.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoader.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test; import net.neoforged.bus.test.general.*; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoaderBase.java b/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoaderBase.java index f4d2c29..18f1795 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoaderBase.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/TestNoLoaderBase.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/Whitebox.java b/bus-test/src/test/java/net/neoforged/bus/test/Whitebox.java index 1f4d93a..6506174 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/Whitebox.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/Whitebox.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test; import java.lang.reflect.Field; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/AbstractEventClassesTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/AbstractEventClassesTest.java index 19d5f02..edb70fa 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/AbstractEventClassesTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/AbstractEventClassesTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/CommonSubscribeEventErrorsTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/CommonSubscribeEventErrorsTest.java index 2bce16a..c5aada5 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/CommonSubscribeEventErrorsTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/CommonSubscribeEventErrorsTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/DeadlockingEventTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/DeadlockingEventTest.java index 8ea9d88..49d6a31 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/DeadlockingEventTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/DeadlockingEventTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/EventBusSubtypeFilterTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/EventBusSubtypeFilterTest.java index 8416dd7..9034f69 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/EventBusSubtypeFilterTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/EventBusSubtypeFilterTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.util.function.Supplier; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/EventClassCheckTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/EventClassCheckTest.java index ce3515c..5d41620 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/EventClassCheckTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/EventClassCheckTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.util.function.Supplier; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/EventFiringEventTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/EventFiringEventTest.java index 99f021f..01aa34f 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/EventFiringEventTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/EventFiringEventTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/EventHandlerExceptionTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/EventHandlerExceptionTest.java index f3485cf..52afed3 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/EventHandlerExceptionTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/EventHandlerExceptionTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/GenericListenerTests.java b/bus-test/src/test/java/net/neoforged/bus/test/general/GenericListenerTests.java index bf8f89d..1e4fd57 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/GenericListenerTests.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/GenericListenerTests.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.lang.reflect.Type; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/LambdaHandlerTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/LambdaHandlerTest.java index 22430da..ccf9f0a 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/LambdaHandlerTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/LambdaHandlerTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/NonPublicEventHandler.java b/bus-test/src/test/java/net/neoforged/bus/test/general/NonPublicEventHandler.java index 2aa7a4d..4329f4c 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/NonPublicEventHandler.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/NonPublicEventHandler.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.util.function.Supplier; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/ParallelEventTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/ParallelEventTest.java index 2887d42..f0025db 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/ParallelEventTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/ParallelEventTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.ListenerList; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTest.java index 35c6d87..1cf4b23 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTestDummy.java b/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTestDummy.java index 880f38e..f45c7b4 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTestDummy.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/ParentHandlersGetInvokedTestDummy.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.BusBuilder; diff --git a/bus-test/src/test/java/net/neoforged/bus/test/general/ThreadedListenerExceptionTest.java b/bus-test/src/test/java/net/neoforged/bus/test/general/ThreadedListenerExceptionTest.java index 62f484d..74f6e33 100644 --- a/bus-test/src/test/java/net/neoforged/bus/test/general/ThreadedListenerExceptionTest.java +++ b/bus-test/src/test/java/net/neoforged/bus/test/general/ThreadedListenerExceptionTest.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.test.general; import net.neoforged.bus.api.*; diff --git a/bus-testjars/src/main/java/module-info.java b/bus-testjars/src/main/java/module-info.java index bb657cc..c9b0c11 100644 --- a/bus-testjars/src/main/java/module-info.java +++ b/bus-testjars/src/main/java/module-info.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + open module net.neoforged.bus.testjars { requires net.neoforged.bus; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/BenchmarkArmsLength.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/BenchmarkArmsLength.java index 368f8f8..cc17dcb 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/BenchmarkArmsLength.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/BenchmarkArmsLength.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; import java.util.function.Consumer; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/CancellableEvent.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/CancellableEvent.java index 19d566b..99f3332 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/CancellableEvent.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/CancellableEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/EventWithData.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/EventWithData.java index 4bec12f..099ccbf 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/EventWithData.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/EventWithData.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; import net.neoforged.bus.api.Event; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/ResultEvent.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/ResultEvent.java index 9d4a481..8565f72 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/ResultEvent.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/ResultEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; import net.neoforged.bus.api.Event; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberDynamic.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberDynamic.java index c04c10b..f0f1e5d 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberDynamic.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberDynamic.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberLambda.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberLambda.java index fee03ac..76c0cf8 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberLambda.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberLambda.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; import net.neoforged.bus.api.IEventBus; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberStatic.java b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberStatic.java index ed3634d..a4ccb25 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberStatic.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/benchmarks/compiled/SubscriberStatic.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.benchmarks.compiled; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/testjar/DummyEvent.java b/bus-testjars/src/main/java/net/neoforged/bus/testjar/DummyEvent.java index 02d409b..d235492 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/testjar/DummyEvent.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/testjar/DummyEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.testjar; import net.neoforged.bus.api.Event; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/testjar/EventBusTestClass.java b/bus-testjars/src/main/java/net/neoforged/bus/testjar/EventBusTestClass.java index 6927c0c..9497db6 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/testjar/EventBusTestClass.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/testjar/EventBusTestClass.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.testjar; import net.neoforged.bus.api.SubscribeEvent; diff --git a/bus-testjars/src/main/java/net/neoforged/bus/testjar/TestListener.java b/bus-testjars/src/main/java/net/neoforged/bus/testjar/TestListener.java index 1fad885..e4b9320 100644 --- a/bus-testjars/src/main/java/net/neoforged/bus/testjar/TestListener.java +++ b/bus-testjars/src/main/java/net/neoforged/bus/testjar/TestListener.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.testjar; import net.neoforged.bus.api.Event; diff --git a/codeformat/HEADER.txt b/codeformat/HEADER.txt new file mode 100644 index 0000000..4452512 --- /dev/null +++ b/codeformat/HEADER.txt @@ -0,0 +1,2 @@ +Copyright (c) NeoForged and contributors +SPDX-License-Identifier: LGPL-2.1-only \ No newline at end of file diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 91e1b0f..34abea9 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + open module net.neoforged.bus { requires org.objectweb.asm; requires org.apache.logging.log4j; diff --git a/src/main/java/net/neoforged/bus/BusBuilderImpl.java b/src/main/java/net/neoforged/bus/BusBuilderImpl.java index 3de565e..a76a824 100644 --- a/src/main/java/net/neoforged/bus/BusBuilderImpl.java +++ b/src/main/java/net/neoforged/bus/BusBuilderImpl.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import net.neoforged.bus.api.*; diff --git a/src/main/java/net/neoforged/bus/ConsumerEventHandler.java b/src/main/java/net/neoforged/bus/ConsumerEventHandler.java index ce23c41..c7d7592 100644 --- a/src/main/java/net/neoforged/bus/ConsumerEventHandler.java +++ b/src/main/java/net/neoforged/bus/ConsumerEventHandler.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import net.neoforged.bus.api.Event; diff --git a/src/main/java/net/neoforged/bus/EventBusErrorMessage.java b/src/main/java/net/neoforged/bus/EventBusErrorMessage.java index a1c22ae..8a10571 100644 --- a/src/main/java/net/neoforged/bus/EventBusErrorMessage.java +++ b/src/main/java/net/neoforged/bus/EventBusErrorMessage.java @@ -1,3 +1,22 @@ +/* + * Minecraft Forge + * Copyright (c) 2016. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version 2.1 + * of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.neoforged.bus; import net.neoforged.bus.api.Event; diff --git a/src/main/java/net/neoforged/bus/EventListenerFactory.java b/src/main/java/net/neoforged/bus/EventListenerFactory.java index b5b3223..69d3570 100644 --- a/src/main/java/net/neoforged/bus/EventListenerFactory.java +++ b/src/main/java/net/neoforged/bus/EventListenerFactory.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import net.neoforged.bus.api.Event; diff --git a/src/main/java/net/neoforged/bus/IWrapperListener.java b/src/main/java/net/neoforged/bus/IWrapperListener.java index c8a4e29..3a833c6 100644 --- a/src/main/java/net/neoforged/bus/IWrapperListener.java +++ b/src/main/java/net/neoforged/bus/IWrapperListener.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import net.neoforged.bus.api.EventListener; diff --git a/src/main/java/net/neoforged/bus/LockHelper.java b/src/main/java/net/neoforged/bus/LockHelper.java index cb21e02..69cd385 100644 --- a/src/main/java/net/neoforged/bus/LockHelper.java +++ b/src/main/java/net/neoforged/bus/LockHelper.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/net/neoforged/bus/LogMarkers.java b/src/main/java/net/neoforged/bus/LogMarkers.java index 41244a8..31d8355 100644 --- a/src/main/java/net/neoforged/bus/LogMarkers.java +++ b/src/main/java/net/neoforged/bus/LogMarkers.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus; import org.apache.logging.log4j.Marker; diff --git a/src/main/java/net/neoforged/bus/api/BusBuilder.java b/src/main/java/net/neoforged/bus/api/BusBuilder.java index 8c62926..265c918 100644 --- a/src/main/java/net/neoforged/bus/api/BusBuilder.java +++ b/src/main/java/net/neoforged/bus/api/BusBuilder.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.api; import net.neoforged.bus.BusBuilderImpl; diff --git a/src/main/java/net/neoforged/bus/api/GenericEvent.java b/src/main/java/net/neoforged/bus/api/GenericEvent.java index bf6f108..ed5a50b 100644 --- a/src/main/java/net/neoforged/bus/api/GenericEvent.java +++ b/src/main/java/net/neoforged/bus/api/GenericEvent.java @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package net.neoforged.bus.api; import java.lang.reflect.Type; diff --git a/src/main/java/net/neoforged/bus/api/ICancellableEvent.java b/src/main/java/net/neoforged/bus/api/ICancellableEvent.java index 951d4f0..e0b596c 100644 --- a/src/main/java/net/neoforged/bus/api/ICancellableEvent.java +++ b/src/main/java/net/neoforged/bus/api/ICancellableEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.api; import org.jetbrains.annotations.ApiStatus; diff --git a/src/main/java/net/neoforged/bus/api/IEventBus.java b/src/main/java/net/neoforged/bus/api/IEventBus.java index 80d751e..ca951c6 100644 --- a/src/main/java/net/neoforged/bus/api/IEventBus.java +++ b/src/main/java/net/neoforged/bus/api/IEventBus.java @@ -1,3 +1,22 @@ +/* + * Minecraft Forge + * Copyright (c) 2016. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version 2.1 + * of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + package net.neoforged.bus.api; import java.util.function.Consumer; diff --git a/src/main/java/net/neoforged/bus/api/IEventClassChecker.java b/src/main/java/net/neoforged/bus/api/IEventClassChecker.java index c876c51..17dedac 100644 --- a/src/main/java/net/neoforged/bus/api/IEventClassChecker.java +++ b/src/main/java/net/neoforged/bus/api/IEventClassChecker.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) NeoForged and contributors + * SPDX-License-Identifier: LGPL-2.1-only + */ + package net.neoforged.bus.api; @FunctionalInterface diff --git a/src/main/java/net/neoforged/bus/api/IGenericEvent.java b/src/main/java/net/neoforged/bus/api/IGenericEvent.java index 702cdba..93a00ba 100644 --- a/src/main/java/net/neoforged/bus/api/IGenericEvent.java +++ b/src/main/java/net/neoforged/bus/api/IGenericEvent.java @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package net.neoforged.bus.api; import java.lang.reflect.Type;