feat: implement separate releases

resolves #73
This commit is contained in:
Adrian 2023-02-07 12:24:05 -05:00
parent d04626fb00
commit 74b75fc5f9
4 changed files with 43 additions and 63 deletions

View File

@ -1,50 +1,7 @@
plugins {
java
alias(libs.plugins.shadow)
}
repositories {
maven("https://repo.alessiodp.com/releases/") {
mavenContent {
includeGroup("net.byteflux")
}
}
}
allprojects { allprojects {
apply<JavaPlugin>() apply<JavaPlugin>()
repositories { repositories {
maven("https://repo.papermc.io/repository/maven-public/") 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)
}
}

View File

@ -23,12 +23,15 @@ repositories {
} }
dependencies { dependencies {
compileOnly(projects.authmevelocityCommon)
compileOnly(projects.authmevelocityApiPaper)
compileOnly(libs.paper) compileOnly(libs.paper)
compileOnly(libs.authme) compileOnly(libs.authme)
compileOnly(libs.miniplaceholders) compileOnly(libs.miniplaceholders)
shadow(libs.libby.bukkit)
implementation(projects.authmevelocityCommon)
implementation(projects.authmevelocityApiPaper)
implementation(libs.libby.bukkit)
} }
bukkit { bukkit {
@ -45,8 +48,20 @@ bukkit {
tasks { tasks {
shadowJar { 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") 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))

View File

@ -17,23 +17,21 @@
package io.github._4drian3d.authmevelocity.paper; package io.github._4drian3d.authmevelocity.paper;
import io.github._4drian3d.authmevelocity.paper.listeners.AuthMeListener; import com.google.common.io.ByteArrayDataOutput;
import io.github._4drian3d.authmevelocity.paper.listeners.MessageListener; 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.ConfigurationContainer;
import io.github._4drian3d.authmevelocity.common.configuration.Loader; import io.github._4drian3d.authmevelocity.common.configuration.Loader;
import io.github._4drian3d.authmevelocity.common.configuration.PaperConfiguration; import io.github._4drian3d.authmevelocity.common.configuration.PaperConfiguration;
import io.github._4drian3d.authmevelocity.common.MessageType; import io.github._4drian3d.authmevelocity.paper.listeners.AuthMeListener;
import io.github._4drian3d.authmevelocity.common.LibsManager; import io.github._4drian3d.authmevelocity.paper.listeners.MessageListener;
import com.google.common.io.ByteArrayDataOutput; import net.byteflux.libby.BukkitLibraryManager;
import com.google.common.io.ByteStreams;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import net.byteflux.libby.BukkitLibraryManager;
import java.util.logging.Level; import java.util.logging.Level;
public final class AuthMeVelocityPlugin extends JavaPlugin { public final class AuthMeVelocityPlugin extends JavaPlugin {

View File

@ -22,22 +22,32 @@ repositories {
} }
dependencies { dependencies {
compileOnly(projects.authmevelocityCommon)
compileOnly(projects.authmevelocityApiVelocity)
compileOnly(libs.velocity) compileOnly(libs.velocity)
annotationProcessor(libs.velocity)
compileOnly(libs.miniplaceholders) compileOnly(libs.miniplaceholders)
compileOnly(libs.fastlogin.velocity) compileOnly(libs.fastlogin.velocity)
shadow(libs.libby.velocity)
shadow(libs.bstats.velocity) implementation(projects.authmevelocityCommon)
annotationProcessor(libs.velocity) implementation(projects.authmevelocityApiVelocity)
implementation(libs.libby.velocity)
implementation(libs.bstats.velocity)
} }
tasks { tasks {
shadowJar { shadowJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName.set("AuthMeVelocity-Velocity-${project.version}.jar")
archiveClassifier.set("")
relocate("net.byteflux.libby", "io.github._4drian3d.authmevelocity.libs.libby") relocate("net.byteflux.libby", "io.github._4drian3d.authmevelocity.libs.libby")
relocate("org.bstats", "io.github._4drian3d.authmevelocity.libs.bstats") relocate("org.bstats", "io.github._4drian3d.authmevelocity.libs.bstats")
configurations = listOf(project.configurations.shadow.get()) }
build {
dependsOn(shadowJar)
} }
} }