diff --git a/pom.xml b/pom.xml index 2a04b88..ed9315f 100644 --- a/pom.xml +++ b/pom.xml @@ -31,4 +31,34 @@ + + + + m724 + https://git.m724.eu/api/packages/Minecon724/maven + + + m724 + https://git.m724.eu/api/packages/Minecon724/maven + + + + + + + org.apache.maven.plugins + maven-release-plugin + 3.1.1 + + true + + + + + + + scm:git:git@git.m724.eu:Minecon724/chatapi.git + HEAD + + \ No newline at end of file diff --git a/src/main/java/eu/m724/Main.java b/src/main/java/eu/m724/chatapi/Main.java similarity index 95% rename from src/main/java/eu/m724/Main.java rename to src/main/java/eu/m724/chatapi/Main.java index e41f6c3..cb54e9e 100644 --- a/src/main/java/eu/m724/Main.java +++ b/src/main/java/eu/m724/chatapi/Main.java @@ -1,14 +1,14 @@ -package eu.m724; +package eu.m724.chatapi; -import eu.m724.chat.Chat; -import eu.m724.chat.ChatEvent; -import eu.m724.chat.ChatMessage; -import eu.m724.example.OaiSource; -import eu.m724.source.ChatResponse; -import eu.m724.source.ChatSource; -import eu.m724.source.exception.HttpException; -import eu.m724.source.option.Option; -import eu.m724.source.option.Options; +import eu.m724.chatapi.chat.Chat; +import eu.m724.chatapi.chat.ChatEvent; +import eu.m724.chatapi.chat.ChatMessage; +import eu.m724.chatapi.example.OaiSource; +import eu.m724.chatapi.source.ChatResponse; +import eu.m724.chatapi.source.ChatSource; +import eu.m724.chatapi.source.exception.HttpException; +import eu.m724.chatapi.source.option.Option; +import eu.m724.chatapi.source.option.Options; import java.util.NoSuchElementException; import java.util.Scanner; diff --git a/src/main/java/eu/m724/chat/Chat.java b/src/main/java/eu/m724/chatapi/chat/Chat.java similarity index 93% rename from src/main/java/eu/m724/chat/Chat.java rename to src/main/java/eu/m724/chatapi/chat/Chat.java index 4ba3c40..96a0f15 100644 --- a/src/main/java/eu/m724/chat/Chat.java +++ b/src/main/java/eu/m724/chatapi/chat/Chat.java @@ -1,4 +1,4 @@ -package eu.m724.chat; +package eu.m724.chatapi.chat; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/eu/m724/chat/ChatEvent.java b/src/main/java/eu/m724/chatapi/chat/ChatEvent.java similarity index 94% rename from src/main/java/eu/m724/chat/ChatEvent.java rename to src/main/java/eu/m724/chatapi/chat/ChatEvent.java index b19930b..84f6bd3 100644 --- a/src/main/java/eu/m724/chat/ChatEvent.java +++ b/src/main/java/eu/m724/chatapi/chat/ChatEvent.java @@ -1,4 +1,4 @@ -package eu.m724.chat; +package eu.m724.chatapi.chat; public record ChatEvent( String text, diff --git a/src/main/java/eu/m724/chat/ChatMessage.java b/src/main/java/eu/m724/chatapi/chat/ChatMessage.java similarity index 84% rename from src/main/java/eu/m724/chat/ChatMessage.java rename to src/main/java/eu/m724/chatapi/chat/ChatMessage.java index 538b278..77a1ede 100644 --- a/src/main/java/eu/m724/chat/ChatMessage.java +++ b/src/main/java/eu/m724/chatapi/chat/ChatMessage.java @@ -1,4 +1,4 @@ -package eu.m724.chat; +package eu.m724.chatapi.chat; public record ChatMessage(boolean assistant, String text) { public static ChatMessage assistant(String text) { diff --git a/src/main/java/eu/m724/example/ExampleSource.groovy b/src/main/java/eu/m724/chatapi/example/ExampleSource.groovy similarity index 94% rename from src/main/java/eu/m724/example/ExampleSource.groovy rename to src/main/java/eu/m724/chatapi/example/ExampleSource.groovy index 6c4d7d5..b8b8078 100644 --- a/src/main/java/eu/m724/example/ExampleSource.groovy +++ b/src/main/java/eu/m724/chatapi/example/ExampleSource.groovy @@ -1,13 +1,13 @@ -package eu.m724.example +package eu.m724.chatapi.example -import eu.m724.chat.Chat -import eu.m724.chat.ChatEvent -import eu.m724.chat.ChatMessage -import eu.m724.source.ChatResponse -import eu.m724.source.ChatSource -import eu.m724.source.ChatSourceInfo -import eu.m724.source.option.Options -import eu.m724.source.option.StringOption +import eu.m724.chatapi.chat.Chat +import eu.m724.chatapi.chat.ChatEvent +import eu.m724.chatapi.chat.ChatMessage +import eu.m724.chatapi.source.ChatResponse +import eu.m724.chatapi.source.ChatSource +import eu.m724.chatapi.source.ChatSourceInfo +import eu.m724.chatapi.source.option.Options +import eu.m724.chatapi.source.option.StringOption import java.util.concurrent.CompletableFuture import java.util.concurrent.LinkedBlockingQueue diff --git a/src/main/java/eu/m724/example/OaiSource.groovy b/src/main/java/eu/m724/chatapi/example/OaiSource.groovy similarity index 90% rename from src/main/java/eu/m724/example/OaiSource.groovy rename to src/main/java/eu/m724/chatapi/example/OaiSource.groovy index 48e7c1e..0e0246a 100644 --- a/src/main/java/eu/m724/example/OaiSource.groovy +++ b/src/main/java/eu/m724/chatapi/example/OaiSource.groovy @@ -1,14 +1,14 @@ -package eu.m724.example +package eu.m724.chatapi.example -import eu.m724.chat.Chat -import eu.m724.source.ChatResponse -import eu.m724.source.ChatSource -import eu.m724.source.ChatSourceInfo -import eu.m724.source.exception.HttpException -import eu.m724.source.impl.StreamingChatResponse -import eu.m724.source.option.DoubleOption -import eu.m724.source.option.Options -import eu.m724.source.option.StringOption +import eu.m724.chatapi.chat.Chat +import eu.m724.chatapi.source.ChatResponse +import eu.m724.chatapi.source.ChatSource +import eu.m724.chatapi.source.ChatSourceInfo +import eu.m724.chatapi.source.exception.HttpException +import eu.m724.chatapi.source.impl.StreamingChatResponse +import eu.m724.chatapi.source.option.DoubleOption +import eu.m724.chatapi.source.option.Options +import eu.m724.chatapi.source.option.StringOption import org.json.JSONArray import org.json.JSONObject diff --git a/src/main/java/eu/m724/source/ChatResponse.java b/src/main/java/eu/m724/chatapi/source/ChatResponse.java similarity index 89% rename from src/main/java/eu/m724/source/ChatResponse.java rename to src/main/java/eu/m724/chatapi/source/ChatResponse.java index 3ab9b49..49419f0 100644 --- a/src/main/java/eu/m724/source/ChatResponse.java +++ b/src/main/java/eu/m724/chatapi/source/ChatResponse.java @@ -1,7 +1,7 @@ -package eu.m724.source; +package eu.m724.chatapi.source; -import eu.m724.chat.ChatEvent; -import eu.m724.chat.ChatMessage; +import eu.m724.chatapi.chat.ChatEvent; +import eu.m724.chatapi.chat.ChatMessage; import java.util.concurrent.CompletableFuture; import java.util.concurrent.LinkedBlockingQueue; diff --git a/src/main/java/eu/m724/source/ChatSource.java b/src/main/java/eu/m724/chatapi/source/ChatSource.java similarity index 90% rename from src/main/java/eu/m724/source/ChatSource.java rename to src/main/java/eu/m724/chatapi/source/ChatSource.java index e18c80c..5a43e1b 100644 --- a/src/main/java/eu/m724/source/ChatSource.java +++ b/src/main/java/eu/m724/chatapi/source/ChatSource.java @@ -1,7 +1,7 @@ -package eu.m724.source; +package eu.m724.chatapi.source; -import eu.m724.chat.Chat; -import eu.m724.source.option.Options; +import eu.m724.chatapi.chat.Chat; +import eu.m724.chatapi.source.option.Options; public interface ChatSource { /** diff --git a/src/main/java/eu/m724/source/ChatSourceInfo.java b/src/main/java/eu/m724/chatapi/source/ChatSourceInfo.java similarity index 74% rename from src/main/java/eu/m724/source/ChatSourceInfo.java rename to src/main/java/eu/m724/chatapi/source/ChatSourceInfo.java index 93d55b7..7da1085 100644 --- a/src/main/java/eu/m724/source/ChatSourceInfo.java +++ b/src/main/java/eu/m724/chatapi/source/ChatSourceInfo.java @@ -1,4 +1,4 @@ -package eu.m724.source; +package eu.m724.chatapi.source; public record ChatSourceInfo(String name, String author, String versionName, int version) { } diff --git a/src/main/java/eu/m724/source/exception/HttpException.java b/src/main/java/eu/m724/chatapi/source/exception/HttpException.java similarity index 84% rename from src/main/java/eu/m724/source/exception/HttpException.java rename to src/main/java/eu/m724/chatapi/source/exception/HttpException.java index 04d0b6a..1f46ceb 100644 --- a/src/main/java/eu/m724/source/exception/HttpException.java +++ b/src/main/java/eu/m724/chatapi/source/exception/HttpException.java @@ -1,4 +1,4 @@ -package eu.m724.source.exception; +package eu.m724.chatapi.source.exception; // TODO rename? public class HttpException extends Exception { diff --git a/src/main/java/eu/m724/source/impl/NonStreamingChatResponse.java b/src/main/java/eu/m724/chatapi/source/impl/NonStreamingChatResponse.java similarity index 90% rename from src/main/java/eu/m724/source/impl/NonStreamingChatResponse.java rename to src/main/java/eu/m724/chatapi/source/impl/NonStreamingChatResponse.java index c7a61bc..0bee30f 100644 --- a/src/main/java/eu/m724/source/impl/NonStreamingChatResponse.java +++ b/src/main/java/eu/m724/chatapi/source/impl/NonStreamingChatResponse.java @@ -1,8 +1,8 @@ -package eu.m724.source.impl; +package eu.m724.chatapi.source.impl; -import eu.m724.chat.ChatEvent; -import eu.m724.chat.ChatMessage; -import eu.m724.source.ChatResponse; +import eu.m724.chatapi.chat.ChatEvent; +import eu.m724.chatapi.chat.ChatMessage; +import eu.m724.chatapi.source.ChatResponse; import java.util.concurrent.CompletableFuture; import java.util.concurrent.LinkedBlockingQueue; diff --git a/src/main/java/eu/m724/source/impl/StreamingChatResponse.java b/src/main/java/eu/m724/chatapi/source/impl/StreamingChatResponse.java similarity index 91% rename from src/main/java/eu/m724/source/impl/StreamingChatResponse.java rename to src/main/java/eu/m724/chatapi/source/impl/StreamingChatResponse.java index 044c2b8..8bcb5b1 100644 --- a/src/main/java/eu/m724/source/impl/StreamingChatResponse.java +++ b/src/main/java/eu/m724/chatapi/source/impl/StreamingChatResponse.java @@ -1,8 +1,8 @@ -package eu.m724.source.impl; +package eu.m724.chatapi.source.impl; -import eu.m724.chat.ChatEvent; -import eu.m724.chat.ChatMessage; -import eu.m724.source.ChatResponse; +import eu.m724.chatapi.chat.ChatEvent; +import eu.m724.chatapi.chat.ChatMessage; +import eu.m724.chatapi.source.ChatResponse; import java.util.concurrent.CompletableFuture; import java.util.concurrent.LinkedBlockingQueue; diff --git a/src/main/java/eu/m724/source/option/DoubleOption.java b/src/main/java/eu/m724/chatapi/source/option/DoubleOption.java similarity index 94% rename from src/main/java/eu/m724/source/option/DoubleOption.java rename to src/main/java/eu/m724/chatapi/source/option/DoubleOption.java index 00c6c52..9213855 100644 --- a/src/main/java/eu/m724/source/option/DoubleOption.java +++ b/src/main/java/eu/m724/chatapi/source/option/DoubleOption.java @@ -1,4 +1,4 @@ -package eu.m724.source.option; +package eu.m724.chatapi.source.option; public class DoubleOption extends Option { private double minValue = Double.MIN_VALUE; diff --git a/src/main/java/eu/m724/source/option/NumberOption.java b/src/main/java/eu/m724/chatapi/source/option/NumberOption.java similarity index 94% rename from src/main/java/eu/m724/source/option/NumberOption.java rename to src/main/java/eu/m724/chatapi/source/option/NumberOption.java index 293e638..3211354 100644 --- a/src/main/java/eu/m724/source/option/NumberOption.java +++ b/src/main/java/eu/m724/chatapi/source/option/NumberOption.java @@ -1,4 +1,4 @@ -package eu.m724.source.option; +package eu.m724.chatapi.source.option; public class NumberOption extends Option { private int minValue = Integer.MIN_VALUE; diff --git a/src/main/java/eu/m724/source/option/Option.java b/src/main/java/eu/m724/chatapi/source/option/Option.java similarity index 98% rename from src/main/java/eu/m724/source/option/Option.java rename to src/main/java/eu/m724/chatapi/source/option/Option.java index 4ea5675..917e116 100644 --- a/src/main/java/eu/m724/source/option/Option.java +++ b/src/main/java/eu/m724/chatapi/source/option/Option.java @@ -1,4 +1,4 @@ -package eu.m724.source.option; +package eu.m724.chatapi.source.option; import java.lang.reflect.ParameterizedType; diff --git a/src/main/java/eu/m724/source/option/Options.java b/src/main/java/eu/m724/chatapi/source/option/Options.java similarity index 98% rename from src/main/java/eu/m724/source/option/Options.java rename to src/main/java/eu/m724/chatapi/source/option/Options.java index 3058d16..ec64ee1 100644 --- a/src/main/java/eu/m724/source/option/Options.java +++ b/src/main/java/eu/m724/chatapi/source/option/Options.java @@ -1,4 +1,4 @@ -package eu.m724.source.option; +package eu.m724.chatapi.source.option; import java.util.*; import java.util.function.Function; diff --git a/src/main/java/eu/m724/source/option/StringOption.java b/src/main/java/eu/m724/chatapi/source/option/StringOption.java similarity index 94% rename from src/main/java/eu/m724/source/option/StringOption.java rename to src/main/java/eu/m724/chatapi/source/option/StringOption.java index 08e1296..22161a1 100644 --- a/src/main/java/eu/m724/source/option/StringOption.java +++ b/src/main/java/eu/m724/chatapi/source/option/StringOption.java @@ -1,4 +1,4 @@ -package eu.m724.source.option; +package eu.m724.chatapi.source.option; import java.util.regex.Pattern;