From 74b75fc5f9e3c6b58a0c203f8561968ddc374454 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 7 Feb 2023 12:24:05 -0500 Subject: [PATCH] feat: implement separate releases resolves #73 --- build.gradle.kts | 43 ------------------- paper/build.gradle.kts | 25 ++++++++--- .../paper/AuthMeVelocityPlugin.java | 16 +++---- velocity/build.gradle.kts | 22 +++++++--- 4 files changed, 43 insertions(+), 63 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7b0920b..91f84ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,50 +1,7 @@ -plugins { - java - alias(libs.plugins.shadow) -} - -repositories { - maven("https://repo.alessiodp.com/releases/") { - mavenContent { - includeGroup("net.byteflux") - } - } -} - allprojects { apply() repositories { maven("https://repo.papermc.io/repository/maven-public/") } - - tasks.compileJava { - options.encoding = Charsets.UTF_8.name() - options.release.set(17) - } - - java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) } - -dependencies { - shadow(project(":authmevelocity-common", "shadow")) - shadow(projects.authmevelocityApiPaper) - shadow(projects.authmevelocityApiVelocity) - shadow(project(":authmevelocity-velocity", "shadow")) - shadow(project(":authmevelocity-paper", "shadow")) -} - -tasks { - shadowJar { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - archiveFileName.set("AuthMeVelocity.jar") - configurations = listOf(project.configurations.shadow.get()) - exclude("net/byteflux/libby/**/") - exclude("org/bstats/**/") - } - - build { - dependsOn(shadowJar) - } -} - diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 3a49f95..627c7d2 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -23,12 +23,15 @@ repositories { } dependencies { - compileOnly(projects.authmevelocityCommon) - compileOnly(projects.authmevelocityApiPaper) compileOnly(libs.paper) compileOnly(libs.authme) + compileOnly(libs.miniplaceholders) - shadow(libs.libby.bukkit) + + implementation(projects.authmevelocityCommon) + implementation(projects.authmevelocityApiPaper) + + implementation(libs.libby.bukkit) } bukkit { @@ -45,8 +48,20 @@ bukkit { tasks { shadowJar { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE + //duplicatesStrategy = DuplicatesStrategy.EXCLUDE + archiveFileName.set("AuthMeVelocity-Paper-${project.version}.jar") + archiveClassifier.set("") relocate("net.byteflux.libby", "io.github._4drian3d.authmevelocity.libs.libby") - configurations = listOf(project.configurations.shadow.get()) + } + + build { + dependsOn(shadowJar) } } + +tasks.compileJava { + options.encoding = Charsets.UTF_8.name() + options.release.set(17) +} + +java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) diff --git a/paper/src/main/java/io/github/_4drian3d/authmevelocity/paper/AuthMeVelocityPlugin.java b/paper/src/main/java/io/github/_4drian3d/authmevelocity/paper/AuthMeVelocityPlugin.java index a3876d7..34ae532 100644 --- a/paper/src/main/java/io/github/_4drian3d/authmevelocity/paper/AuthMeVelocityPlugin.java +++ b/paper/src/main/java/io/github/_4drian3d/authmevelocity/paper/AuthMeVelocityPlugin.java @@ -17,23 +17,21 @@ package io.github._4drian3d.authmevelocity.paper; -import io.github._4drian3d.authmevelocity.paper.listeners.AuthMeListener; -import io.github._4drian3d.authmevelocity.paper.listeners.MessageListener; +import com.google.common.io.ByteArrayDataOutput; +import com.google.common.io.ByteStreams; +import io.github._4drian3d.authmevelocity.common.LibsManager; +import io.github._4drian3d.authmevelocity.common.MessageType; import io.github._4drian3d.authmevelocity.common.configuration.ConfigurationContainer; import io.github._4drian3d.authmevelocity.common.configuration.Loader; import io.github._4drian3d.authmevelocity.common.configuration.PaperConfiguration; -import io.github._4drian3d.authmevelocity.common.MessageType; -import io.github._4drian3d.authmevelocity.common.LibsManager; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; - +import io.github._4drian3d.authmevelocity.paper.listeners.AuthMeListener; +import io.github._4drian3d.authmevelocity.paper.listeners.MessageListener; +import net.byteflux.libby.BukkitLibraryManager; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; -import net.byteflux.libby.BukkitLibraryManager; - import java.util.logging.Level; public final class AuthMeVelocityPlugin extends JavaPlugin { diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index e926500..ccb2038 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -22,22 +22,32 @@ repositories { } dependencies { - compileOnly(projects.authmevelocityCommon) - compileOnly(projects.authmevelocityApiVelocity) compileOnly(libs.velocity) + annotationProcessor(libs.velocity) + compileOnly(libs.miniplaceholders) compileOnly(libs.fastlogin.velocity) - shadow(libs.libby.velocity) - shadow(libs.bstats.velocity) - annotationProcessor(libs.velocity) + + implementation(projects.authmevelocityCommon) + implementation(projects.authmevelocityApiVelocity) + + implementation(libs.libby.velocity) + implementation(libs.bstats.velocity) } tasks { shadowJar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE + + archiveFileName.set("AuthMeVelocity-Velocity-${project.version}.jar") + archiveClassifier.set("") + relocate("net.byteflux.libby", "io.github._4drian3d.authmevelocity.libs.libby") relocate("org.bstats", "io.github._4drian3d.authmevelocity.libs.bstats") - configurations = listOf(project.configurations.shadow.get()) + } + + build { + dependsOn(shadowJar) } }