diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index aa42682..cf983bf 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -19,6 +19,7 @@ dependencies { modImplementation("net.fabricmc:fabric-loader:${prop("loader_version")}") implementation(project(":api")) + testImplementation(project(":http")) } tasks.processResources { diff --git a/fabric/src/test/java/net/mcbrawls/inject/fabric/test/InjectTestMod.java b/fabric/src/test/java/net/mcbrawls/inject/fabric/test/InjectTestMod.java index 415c217..38bf70f 100644 --- a/fabric/src/test/java/net/mcbrawls/inject/fabric/test/InjectTestMod.java +++ b/fabric/src/test/java/net/mcbrawls/inject/fabric/test/InjectTestMod.java @@ -2,11 +2,9 @@ import io.netty.channel.ChannelHandlerContext; import net.fabricmc.api.DedicatedServerModInitializer; -import net.fabricmc.api.ModInitializer; -import net.mcbrawls.inject.api.InjectorContext; -import net.mcbrawls.inject.api.http.HttpByteBuf; -import net.mcbrawls.inject.api.http.HttpInjector; -import net.mcbrawls.inject.api.http.HttpRequest; +import net.mcbrawls.inject.http.HttpByteBuf; +import net.mcbrawls.inject.http.HttpInjector; +import net.mcbrawls.inject.http.HttpRequest; import net.mcbrawls.inject.fabric.InjectFabric; public class InjectTestMod implements DedicatedServerModInitializer { diff --git a/gradle.properties b/gradle.properties index 27992e8..0e742d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.21.1+build.3 loader_version=0.16.7 # Mod Properties -version=2.1.1 +version=2.2.0 group=net.mcbrawls.inject id=inject diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/api/src/main/java/net/mcbrawls/inject/api/http/HttpByteBuf.java b/http/src/main/java/net/mcbrawls/inject/http/HttpByteBuf.java similarity index 97% rename from api/src/main/java/net/mcbrawls/inject/api/http/HttpByteBuf.java rename to http/src/main/java/net/mcbrawls/inject/http/HttpByteBuf.java index 2d40cc0..053c325 100644 --- a/api/src/main/java/net/mcbrawls/inject/api/http/HttpByteBuf.java +++ b/http/src/main/java/net/mcbrawls/inject/http/HttpByteBuf.java @@ -1,4 +1,4 @@ -package net.mcbrawls.inject.api.http; +package net.mcbrawls.inject.http; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; diff --git a/api/src/main/java/net/mcbrawls/inject/api/http/HttpInjector.java b/http/src/main/java/net/mcbrawls/inject/http/HttpInjector.java similarity index 98% rename from api/src/main/java/net/mcbrawls/inject/api/http/HttpInjector.java rename to http/src/main/java/net/mcbrawls/inject/http/HttpInjector.java index fca6b5c..3048626 100644 --- a/api/src/main/java/net/mcbrawls/inject/api/http/HttpInjector.java +++ b/http/src/main/java/net/mcbrawls/inject/http/HttpInjector.java @@ -1,4 +1,4 @@ -package net.mcbrawls.inject.api.http; +package net.mcbrawls.inject.http; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelFutureListener; diff --git a/api/src/main/java/net/mcbrawls/inject/api/http/HttpRequest.java b/http/src/main/java/net/mcbrawls/inject/http/HttpRequest.java similarity index 98% rename from api/src/main/java/net/mcbrawls/inject/api/http/HttpRequest.java rename to http/src/main/java/net/mcbrawls/inject/http/HttpRequest.java index 0e78a42..b848722 100644 --- a/api/src/main/java/net/mcbrawls/inject/api/http/HttpRequest.java +++ b/http/src/main/java/net/mcbrawls/inject/http/HttpRequest.java @@ -1,4 +1,4 @@ -package net.mcbrawls.inject.api.http; +package net.mcbrawls.inject.http; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufInputStream; diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 31306bb..bbfb2eb 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -35,10 +35,13 @@ dependencies { val version = prop("minecraft_version") + "-R0.1-SNAPSHOT" implementation(project(":api")) + implementation(project(":http")) + paperweight.paperDevBundle(version) exampleCompileOnly("io.papermc.paper:paper-api:$version") exampleImplementation(project(":api")) + exampleImplementation(project(":http")) } tasks { @@ -47,6 +50,7 @@ tasks { from(sourceSets["main"].output) from(sourceSets["example"].output) from(project(":api").sourceSets.main.get().output) // Cursed. But it works (I spent 2 hours on this) + from(project(":http").sourceSets.main.get().output) group = "build" } diff --git a/paper/src/example/java/net/mcbrawls/inject/paper/example/InjectPaperExample.java b/paper/src/example/java/net/mcbrawls/inject/paper/example/InjectPaperExample.java index f5d03c1..03daf9c 100644 --- a/paper/src/example/java/net/mcbrawls/inject/paper/example/InjectPaperExample.java +++ b/paper/src/example/java/net/mcbrawls/inject/paper/example/InjectPaperExample.java @@ -1,9 +1,9 @@ package net.mcbrawls.inject.paper.example; import io.netty.channel.ChannelHandlerContext; -import net.mcbrawls.inject.api.http.HttpByteBuf; -import net.mcbrawls.inject.api.http.HttpInjector; -import net.mcbrawls.inject.api.http.HttpRequest; +import net.mcbrawls.inject.http.HttpByteBuf; +import net.mcbrawls.inject.http.HttpInjector; +import net.mcbrawls.inject.http.HttpRequest; import net.mcbrawls.inject.paper.InjectPaper; import org.bukkit.plugin.java.JavaPlugin; diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000..d511317 --- /dev/null +++ b/publish.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for dir in *; do + [[ -f "$dir/build.gradle.kts" ]] && ./gradlew "$dir:publish" +done \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 3204486..b6a6949 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,3 +15,4 @@ include(":api") include(":fabric") include(":paper") include(":spigot") +include(":http") diff --git a/spigot/build.gradle.kts b/spigot/build.gradle.kts index bdb5308..b79cc7b 100644 --- a/spigot/build.gradle.kts +++ b/spigot/build.gradle.kts @@ -49,6 +49,7 @@ tasks { from(sourceSets["main"].output) from(sourceSets["example"].output) // Include the example source set from(project(":api").sourceSets.main.get().output) // Cursed. But it works (I spent 2 hours on this) + from(project(":http").sourceSets.main.get().output) configurations = listOf(exampleImplementation) // Include example dependencies mergeServiceFiles() // Optional: If you need to merge service files diff --git a/spigot/src/example/java/net/mcbrawls/inject/spigot/example/InjectSpigotExample.java b/spigot/src/example/java/net/mcbrawls/inject/spigot/example/InjectSpigotExample.java index 30eceda..fd71585 100644 --- a/spigot/src/example/java/net/mcbrawls/inject/spigot/example/InjectSpigotExample.java +++ b/spigot/src/example/java/net/mcbrawls/inject/spigot/example/InjectSpigotExample.java @@ -1,9 +1,9 @@ package net.mcbrawls.inject.spigot.example; import io.netty.channel.ChannelHandlerContext; -import net.mcbrawls.inject.api.http.HttpByteBuf; -import net.mcbrawls.inject.api.http.HttpInjector; -import net.mcbrawls.inject.api.http.HttpRequest; +import net.mcbrawls.inject.http.HttpByteBuf; +import net.mcbrawls.inject.http.HttpInjector; +import net.mcbrawls.inject.http.HttpRequest; import net.mcbrawls.inject.spigot.InjectSpigot; import org.bukkit.plugin.java.JavaPlugin;