diff --git a/README.md b/README.md index 6f3b94e..25f33e8 100644 --- a/README.md +++ b/README.md @@ -132,8 +132,8 @@ dependencies { #### Gradle Plugin > [!NOTE] > Gradle plugin is a key feature of Paklet. It modifies bytecode of compiled packet classes by adding hidden getters and setters which are later -> used by generated packet readers and writers to ensure no reflection is used during the serialization to achieve higher speeds. -> If unused, the packet serialization will be noticeably slower. +> used by generated packet readers and writers to achieve higher speeds. +> If unused, the packet serialization will be slower. ```kotlin buildscript { repositories { diff --git a/gradle.properties b/gradle.properties index 772847a..a88333a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Group and version group = org.machinemc.paklet -version = 1.0.0 +version = 1.0.1 # Dependency versions jetbrainsAnnotations = 24.1.0 diff --git a/paklet-api/build.gradle.kts b/paklet-api/build.gradle.kts index a6da836..eedea3a 100644 --- a/paklet-api/build.gradle.kts +++ b/paklet-api/build.gradle.kts @@ -18,7 +18,7 @@ publishing { create("maven") { groupId = "org.machinemc" artifactId = "paklet-api" - version = "1.0.0" + version = project.version.toString() from(components["java"]) } } diff --git a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationHandler.java b/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationHandler.java deleted file mode 100644 index f5b84be..0000000 --- a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationHandler.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.machinemc.paklet.translation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Used to mark translation handlers (packet listeners). - *

- * Each method with this annotation is required to have only a single argument of the - * packet it handles. Optionally it can return {@link TranslationResult}. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface TranslationHandler { - - TranslationState value(); - -} diff --git a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationResult.java b/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationResult.java deleted file mode 100644 index ad3cc04..0000000 --- a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationResult.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.machinemc.paklet.translation; - -public enum TranslationResult { - - PASS, - CANCEL - -} diff --git a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationState.java b/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationState.java deleted file mode 100644 index 8db6efb..0000000 --- a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslationState.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.machinemc.paklet.translation; - -public enum TranslationState { - - BEFORE, - AFTER - -} diff --git a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslatorMessenger.java b/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslatorMessenger.java deleted file mode 100644 index e0c4840..0000000 --- a/paklet-api/src/main/java/org/machinemc/paklet/translation/TranslatorMessenger.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.machinemc.paklet.translation; - -import org.jetbrains.annotations.ApiStatus; - -import java.util.function.Consumer; - -@ApiStatus.Internal -@FunctionalInterface -public interface TranslatorMessenger extends Consumer { -} diff --git a/paklet-core/build.gradle.kts b/paklet-core/build.gradle.kts index c0acbaf..75e37dd 100644 --- a/paklet-core/build.gradle.kts +++ b/paklet-core/build.gradle.kts @@ -33,7 +33,7 @@ publishing { create("maven") { groupId = "org.machinemc" artifactId = "paklet-core" - version = "1.0.0" + version = project.version.toString() from(components["java"]) } } diff --git a/paklet-plugin/build.gradle.kts b/paklet-plugin/build.gradle.kts index 49fd0dc..b41055e 100644 --- a/paklet-plugin/build.gradle.kts +++ b/paklet-plugin/build.gradle.kts @@ -1,11 +1,20 @@ +import java.io.FileReader +import java.util.* + plugins { `kotlin-dsl` `java-gradle-plugin` `maven-publish` } -group = "org.machinemc" -version = "1.0.0" +val rootProperties = Properties() +rootProperties.load(FileReader(File(rootDir.parent, "gradle.properties"))) + +val group: String by rootProperties +setGroup(group) + +val version: String by rootProperties +setVersion(version) repositories { mavenCentral() @@ -16,6 +25,10 @@ dependencies { implementation(libs.google.gson) } +java { + withSourcesJar() +} + publishing { repositories { maven { @@ -31,7 +44,7 @@ publishing { create("maven") { groupId = "org.machinemc" artifactId = "paklet-plugin" - version = "1.0.0" + version = project.version.toString() from(components["kotlin"]) } } diff --git a/paklet-processor/build.gradle.kts b/paklet-processor/build.gradle.kts index 85e04f2..a1f3572 100644 --- a/paklet-processor/build.gradle.kts +++ b/paklet-processor/build.gradle.kts @@ -27,7 +27,7 @@ publishing { create("maven") { groupId = "org.machinemc" artifactId = "paklet-processor" - version = "1.0.0" + version = project.version.toString() from(components["java"]) } }