Skip to content
Open

v2 #127

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
`java-library`
`maven-publish`
}

dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
compileOnly("org.jetbrains:annotations:26.0.2")
}

publishing {
publications {
create<MavenPublication>("openminetopiaApi") {
groupId = "nl.openminetopia"
artifactId = "openminetopia-api"
version = project.version.toString()
from(components["java"])
}
}
}
Empty file added api/src/main/java/.gitkeep
Empty file.
199 changes: 37 additions & 162 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,177 +1,52 @@
plugins {
java
id("io.freefair.lombok") version "9.5.0"
id("com.gradleup.shadow") version "9.4.1"
id("io.papermc.paperweight.userdev") version "2.0.0-beta.21"
id("maven-publish")
id("xyz.jpenilla.run-paper") version "3.0.2"
id("io.freefair.lombok") version "9.5.0" apply false
id("com.gradleup.shadow") version "9.4.1" apply false
id("io.papermc.paperweight.userdev") version "2.0.0-beta.21" apply false
id("xyz.jpenilla.run-paper") version "3.0.2" apply false
}

group = "nl.openminetopia"
version = "1.5.0"

repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://jitpack.io")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.skriptlang.org/releases")
maven("https://maven.citizensnpcs.co/repo")
maven("https://repo.fancyplugins.de/releases")
maven("https://dist.labymod.net/api/v1/maven/release/")
maven("https://repo.triumphteam.dev/snapshots/")
maven("https://repo.codemc.io/repository/maven-public/")
}

dependencies {
/* Paper */
paperweight.paperDevBundle("26.1.2.build.+")

/* Configuration */
compileOnly("org.spongepowered:configurate-yaml:4.2.0")
compileOnly("org.spongepowered:configurate-core:4.2.0")

/* Database */
compileOnly("com.zaxxer:HikariCP:7.0.2")
compileOnly("mysql:mysql-connector-java:8.0.33")
compileOnly("org.mariadb.jdbc:mariadb-java-client:3.5.3")
compileOnly("org.xerial:sqlite-jdbc:3.49.1.0")
implementation("com.github.Mindgamesnl:storm:e1f961b480") {
exclude(group = "org.projectlombok", module = "lombok-maven")
}

/* Command Framework */
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")

/* Scoreboard */
val scoreboardLibraryVersion = "2.6.0"
implementation("net.megavex:scoreboard-library-api:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-implementation:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-modern:$scoreboardLibraryVersion:mojmap")

/* PlaceholderAPI */
compileOnly("me.clip:placeholderapi:2.11.6")

/* WorldGuard */
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.15") {
exclude("com.google.guava", "guava")
exclude("com.google.code.gson", "gson")
exclude("it.unimi.dsi", "fastutil")
}

/* Module Manager */
implementation("com.github.duranaaron.ModuleManager:spigot:287350ddac")

/* PersistentData addons */
implementation("com.jeff-media:custom-block-data:2.2.5")
implementation("com.jeff-media:MorePersistentDataTypes:2.4.0")

/* TriumphGUI */
implementation("dev.triumphteam:triumph-gui-paper:3.1.13-SNAPSHOT")

/* bStats */
implementation("org.bstats:bstats-bukkit:3.1.0")

/* Vault */
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
exclude(group = "org.bukkit", module = "bukkit")
}

/* Skript */
compileOnly("com.github.SkriptLang:Skript:2.10.2")

/* Rest API & Portal dependencies */
val vertxVersion = "5.0.5"
compileOnly("io.vertx:vertx-core:$vertxVersion")
compileOnly("io.vertx:vertx-web:$vertxVersion")
compileOnly("io.vertx:vertx-web-client:$vertxVersion")

compileOnly("net.objecthunter:exp4j:0.4.8")

/* Npcs */
compileOnly("net.citizensnpcs:citizensapi:2.0.38-SNAPSHOT")
compileOnly("de.oliver:FancyNpcs:2.6.0")

/* Labymod */
compileOnly("net.labymod.serverapi:server-bukkit:1.0.6")

/* QualityArmory Compatibility */
compileOnly("me.zombie_striker:QualityArmory:2.1.2")
}

val targetJavaVersion = 25
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion

if (JavaVersion.current() < javaVersion) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
allprojects {
group = "nl.openminetopia"
version = "2.0.0-SNAPSHOT"
}

tasks {
runServer {
minecraftVersion("26.1.2")
jvmArgs("-Dcom.mojang.eula.agree=true", "-Dfile.encoding=UTF-8")
downloadPlugins {
github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
hangar("PlaceholderAPI", "2.11.6")
modrinth("WorldGuard", "7.0.16-beta-01")
modrinth("WorldEdit", "CkT32vix")
modrinth("qualityarmory", "2.1.2") // dev
subprojects {
apply(plugin = "java")
apply(plugin = "io.freefair.lombok")

repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://jitpack.io")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.skriptlang.org/releases")
maven("https://maven.citizensnpcs.co/repo")
maven("https://repo.fancyplugins.de/releases")
maven("https://dist.labymod.net/api/v1/maven/release/")
maven("https://repo.triumphteam.dev/snapshots/")
maven("https://repo.codemc.io/repository/maven-public/")
}

val targetJavaVersion = 25
extensions.configure<JavaPluginExtension> {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
}

compileJava {
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
// options.isFork = true
// options.forkOptions.executable = "javac"

if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion)
}
}

processResources {
val props = mapOf("version" to version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("paper-plugin.yml") {
expand(props)
}
}

shadowJar {
archiveFileName.set(rootProject.name + "-" + rootProject.version + ".jar")

relocate("co.aikar.commands", "nl.openminetopia.shaded.acf")
relocate("co.aikar.locales", "nl.openminetopia.shaded.locales")
relocate("net.megavex.scoreboardlibrary", "nl.openminetopia.shaded.scoreboard")
relocate("com.jeff_media.customblockdata", "nl.openminetopia.shaded.customblockdata")
relocate("com.jeff_media.morepersistentdatatypes", "nl.openminetopia.shaded.morepersistentdatatypes")
relocate("dev.triumphteam.gui", "nl.openminetopia.shaded.gui")
relocate("org.bstats", "nl.openminetopia.shaded.bstats")
}

build {
dependsOn("publishToMavenLocal")
dependsOn(shadowJar)
}
}

publishing {
publications {
create<MavenPublication>("api") {
groupId = "nl.openminetopia"
artifactId = "api"
version = version.toString()
}
}
}
10 changes: 10 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
`java-library`
}

dependencies {
api(project(":api"))

compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
compileOnly("org.jetbrains:annotations:26.0.2")
}
Empty file added core/src/main/java/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions integration-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
java
}

dependencies {
testImplementation(project(":api"))
testImplementation(project(":core"))

testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

tasks.test {
useJUnitPlatform()
}
Empty file.
121 changes: 121 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
plugins {
java
id("com.gradleup.shadow")
id("io.papermc.paperweight.userdev")
id("xyz.jpenilla.run-paper")
}

dependencies {
/* Paper */
paperweight.paperDevBundle("26.1.2.build.+")

/* Configuration */
compileOnly("org.spongepowered:configurate-yaml:4.2.0")
compileOnly("org.spongepowered:configurate-core:4.2.0")

/* Database */
compileOnly("com.zaxxer:HikariCP:7.0.2")
compileOnly("mysql:mysql-connector-java:8.0.33")
compileOnly("org.mariadb.jdbc:mariadb-java-client:3.5.3")
compileOnly("org.xerial:sqlite-jdbc:3.49.1.0")
implementation("com.github.Mindgamesnl:storm:e1f961b480") {
exclude(group = "org.projectlombok", module = "lombok-maven")
}

/* Command Framework */
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")

/* Scoreboard */
val scoreboardLibraryVersion = "2.6.0"
implementation("net.megavex:scoreboard-library-api:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-implementation:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-modern:$scoreboardLibraryVersion:mojmap")

/* PlaceholderAPI */
compileOnly("me.clip:placeholderapi:2.11.6")

/* WorldGuard */
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.15") {
exclude("com.google.guava", "guava")
exclude("com.google.code.gson", "gson")
exclude("it.unimi.dsi", "fastutil")
}

/* Module Manager */
implementation("com.github.duranaaron.ModuleManager:spigot:287350ddac")

/* PersistentData addons */
implementation("com.jeff-media:custom-block-data:2.2.5")
implementation("com.jeff-media:MorePersistentDataTypes:2.4.0")

/* TriumphGUI */
implementation("dev.triumphteam:triumph-gui-paper:3.1.13-SNAPSHOT")

/* bStats */
implementation("org.bstats:bstats-bukkit:3.1.0")

/* Vault */
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
exclude(group = "org.bukkit", module = "bukkit")
}

/* Skript */
compileOnly("com.github.SkriptLang:Skript:2.10.2")

/* Rest API & Portal dependencies */
val vertxVersion = "5.0.5"
compileOnly("io.vertx:vertx-core:$vertxVersion")
compileOnly("io.vertx:vertx-web:$vertxVersion")
compileOnly("io.vertx:vertx-web-client:$vertxVersion")

compileOnly("net.objecthunter:exp4j:0.4.8")

/* Npcs */
compileOnly("net.citizensnpcs:citizensapi:2.0.38-SNAPSHOT")
compileOnly("de.oliver:FancyNpcs:2.6.0")

/* Labymod */
compileOnly("net.labymod.serverapi:server-bukkit:1.0.6")

/* QualityArmory Compatibility */
compileOnly("me.zombie_striker:QualityArmory:2.1.2")
}

tasks {
runServer {
minecraftVersion("1.21.11")
jvmArgs("-Dcom.mojang.eula.agree=true", "-Dfile.encoding=UTF-8")
downloadPlugins {
github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
hangar("PlaceholderAPI", "2.11.6")
modrinth("WorldGuard", "7.0.16-beta-01")
modrinth("WorldEdit", "CkT32vix")
modrinth("qualityarmory", "2.1.2")
}
}

processResources {
val props = mapOf("version" to project.version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("paper-plugin.yml") {
expand(props)
}
}

shadowJar {
archiveFileName.set(rootProject.name + "-" + project.version + ".jar")

relocate("co.aikar.commands", "nl.openminetopia.shaded.acf")
relocate("co.aikar.locales", "nl.openminetopia.shaded.locales")
relocate("net.megavex.scoreboardlibrary", "nl.openminetopia.shaded.scoreboard")
relocate("com.jeff_media.customblockdata", "nl.openminetopia.shaded.customblockdata")
relocate("com.jeff_media.morepersistentdatatypes", "nl.openminetopia.shaded.morepersistentdatatypes")
relocate("dev.triumphteam.gui", "nl.openminetopia.shaded.gui")
relocate("org.bstats", "nl.openminetopia.shaded.bstats")
}

build {
dependsOn(shadowJar)
}
}
Loading
Loading