diff --git a/build.gradle.kts b/build.gradle.kts index a1c9feb..80222a0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,63 +4,73 @@ import java.util.Date import java.text.SimpleDateFormat plugins { - id("java") - id("com.github.johnrengelman.shadow") version "8.1.1" - id("org.jetbrains.kotlin.jvm") version "1.9.0" + java + kotlin("jvm") version "1.9.0" apply false + id("com.github.johnrengelman.shadow") version "8.1.1" apply false } group = "xyz.sorridi.velib" version = "1.0-SNAPSHOT" -repositories { - mavenCentral() - maven { - name = "jitpack" - url = uri("https://www.jitpack.io") +subprojects { + apply { + plugin("java") + plugin("org.jetbrains.kotlin.jvm") + plugin("com.github.johnrengelman.shadow") } - maven { - name = "mikigal-repo" - url = uri("https://repo.mikigal.pl/releases") - } - maven { - name = "papermc" - url = uri("https://repo.papermc.io/repository/maven-public/") + + repositories { + mavenCentral() + maven { + name = "jitpack" + url = uri("https://www.jitpack.io") + } + maven { + name = "mikigal-repo" + url = uri("https://repo.mikigal.pl/releases") + } + maven { + name = "papermc" + url = uri("https://repo.papermc.io/repository/maven-public/") + } + maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") + maven("https://oss.sonatype.org/content/repositories/snapshots") + maven("https://oss.sonatype.org/content/repositories/central") } -} -dependencies { - testImplementation(platform("org.junit:junit-bom:5.9.1")) - testImplementation("org.junit.jupiter:junit-jupiter") + dependencies { + testImplementation(platform("org.junit:junit-bom:5.9.1")) + testImplementation("org.junit.jupiter:junit-jupiter") - /* Minecraft related */ - implementation("com.velocitypowered:velocity-api:3.1.1") - annotationProcessor("com.velocitypowered:velocity-api:3.1.1") + /* Data structures related */ + implementation("com.google.guava:guava:32.1.1-jre") + implementation("commons-codec:commons-codec:1.16.0") + implementation("org.apache.commons:commons-collections4:4.4") + implementation("org.apache.commons:commons-math3:3.6.1") + implementation("com.github.ben-manes.caffeine:caffeine:3.1.6") - /* Data structures related */ - implementation("com.google.guava:guava:32.1.1-jre") - implementation("commons-codec:commons-codec:1.16.0") - implementation("org.apache.commons:commons-collections4:4.4") - implementation("org.apache.commons:commons-math3:3.6.1") - implementation("com.github.ben-manes.caffeine:caffeine:3.1.6") + /* DB related */ + implementation("com.rabbitmq:amqp-client:5.18.0") + implementation("com.zaxxer:HikariCP:5.0.1") + implementation("org.jooq:jooq:3.18.5") - /* DB related */ - implementation("com.rabbitmq:amqp-client:5.18.0") - implementation("com.zaxxer:HikariCP:5.0.1") - implementation("org.jooq:jooq:3.18.5") + /* Config related */ + implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4") - /* Config related */ - implementation("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4") -} + /* Reflections related */ + implementation("org.reflections:reflections:0.10.2") + } -tasks.test { - useJUnitPlatform() -} + tasks.test { + useJUnitPlatform() + } -tasks.withType { - kotlinOptions.jvmTarget = "11" -} + tasks.withType { + kotlinOptions.jvmTarget = "11" + } -tasks.withType { - val time = SimpleDateFormat("dd-MM-yyyy_HH-mm").format(Date()) - archiveFileName.set("${project.name}-${time}.jar") -} + tasks.withType { + val time = SimpleDateFormat("dd-MM-yyyy_HH-mm").format(Date()) + archiveFileName.set("${project.name}-${time}.jar") + } +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index d17e343..80df6d7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,2 +1,9 @@ -rootProject.name = "VeLib" +pluginManagement { + repositories { + mavenCentral() + maven("https://plugins.gradle.org/m2/") + } +} +rootProject.name = "VeLib" +include("velib-spigot", "velib-velocity") \ No newline at end of file diff --git a/velib-spigot/build.gradle.kts b/velib-spigot/build.gradle.kts new file mode 100644 index 0000000..a1f4901 --- /dev/null +++ b/velib-spigot/build.gradle.kts @@ -0,0 +1,7 @@ +dependencies { + /* Spigot related */ + compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT") + + // https://mvnrepository.com/artifact/com.mojang/authlib + implementation("com.mojang:authlib:1.5.25") +} \ No newline at end of file diff --git a/velib-spigot/src/main/java/xyz/sorridi/velib/VeLib.java b/velib-spigot/src/main/java/xyz/sorridi/velib/VeLib.java new file mode 100644 index 0000000..7aa3326 --- /dev/null +++ b/velib-spigot/src/main/java/xyz/sorridi/velib/VeLib.java @@ -0,0 +1,18 @@ +package xyz.sorridi.velib; + +import org.bukkit.plugin.java.JavaPlugin; + +public class VeLib extends JavaPlugin +{ + @Override + public void onEnable() + { + + } + + @Override + public void onDisable() + { + + } +} \ No newline at end of file diff --git a/velib-spigot/src/main/resources/plugin.yml b/velib-spigot/src/main/resources/plugin.yml new file mode 100644 index 0000000..0a2e250 --- /dev/null +++ b/velib-spigot/src/main/resources/plugin.yml @@ -0,0 +1,6 @@ +name: VeLib +version: 1.0-SNAPSHOT +main: xyz.sorridi.velib.VeLib +authors: [ Sorridi ] +website: https://github.com/Sorridi/VeLib +load: STARTUP \ No newline at end of file diff --git a/velib-velocity/build.gradle.kts b/velib-velocity/build.gradle.kts new file mode 100644 index 0000000..3867a06 --- /dev/null +++ b/velib-velocity/build.gradle.kts @@ -0,0 +1,5 @@ +dependencies { + /* Velocity related */ + compileOnly("com.velocitypowered:velocity-api:3.1.1") + annotationProcessor("com.velocitypowered:velocity-api:3.1.1") +} \ No newline at end of file diff --git a/src/main/java/xyz/sorridi/velib/VeLib.java b/velib-velocity/src/main/java/xyz/sorridi/velib/VeLib.java similarity index 100% rename from src/main/java/xyz/sorridi/velib/VeLib.java rename to velib-velocity/src/main/java/xyz/sorridi/velib/VeLib.java