mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Split up dependencies for multiple version support.
The "core" module will house the entire abstraction layer of mcMMO, while the "bukkit" and "sponge" modules will house common code to share between the various versions being supported for each platform. Specifically, spigot will be split up based on the listener handlers being registered, and will be shadow packaged according to their targeted Minecraft version. Sponge's multi-version dependency will be based on the API version, since the only constant known between the various API versions is the plugin annotations and basic listener annotations. Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
This commit is contained in:
10
bukkit/1_12/build.gradle.kts
Normal file
10
bukkit/1_12/build.gradle.kts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT") // Spigot API
|
||||
implementation("com.sk89q.worldguard", "worldguard-legacy", "6.2") // WorldGuard
|
||||
|
||||
}
|
10
bukkit/1_13/build.gradle.kts
Normal file
10
bukkit/1_13/build.gradle.kts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT") // Spigot API
|
||||
implementation("com.sk89q.worldguard", "worldguard-core", "7.0.0-SNAPSHOT") // WorldGuard
|
||||
implementation("com.sk89q.worldguard", "worldguard-legacy", "7.0.0-SNAPSHOT") // NEEDED
|
||||
}
|
10
bukkit/1_8_8/build.gradle.kts
Normal file
10
bukkit/1_8_8/build.gradle.kts
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT") // Spigot API
|
||||
implementation("com.sk89q.worldguard:worldguard-legacy:6.1.2") // Old worldguard
|
||||
|
||||
}
|
@ -1,59 +1,34 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
buildscript {
|
||||
repositories { jcenter() }
|
||||
dependencies { classpath("com.github.jengelman.gradle.plugins:shadow:4.0.4") }
|
||||
}
|
||||
val bukkit: Project by rootProject.extra
|
||||
val core: Project by rootProject.extra
|
||||
// This configures the bukkit/spigot ecosystem repositories, so they all share the same repos
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
// Spigot & Bukkit
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
mavenLocal() // For nms variants
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.github.jengelman.gradle.plugins:shadow:4.0.4")
|
||||
compile(core) // includes junit for tests
|
||||
compile("org.bstats", "bstats-bukkit", "1.4") // Bukkit bstats
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
// Spigot & Bukkit
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
|
||||
mavenLocal() // For nms variants
|
||||
subprojects {
|
||||
dependencies {
|
||||
// Provide the base bukkit plugin dependency for plugin classloading.
|
||||
// All "versioned" implementations will be properly classloaded by the bukkit parent
|
||||
(compile(bukkit) as ModuleDependency).apply { exclude("org.spigotmc") }
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
java
|
||||
id("com.github.johnrengelman.shadow")
|
||||
}
|
||||
dependencies {
|
||||
implementation("org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT") // Spigot API
|
||||
implementation("com.sk89q.worldguard", "worldguard-core", "7.0.0-SNAPSHOT") // WorldGuard
|
||||
implementation("com.sk89q.worldguard", "worldguard-legacy", "7.0.0-SNAPSHOT") // NEEDED
|
||||
|
||||
compile("org.bstats", "bstats-bukkit", "1.4") // Bukkit bstats
|
||||
|
||||
implementation("org.apache.tomcat", "tomcat-jdbc", "7.0.52") // tomcat JDBC
|
||||
implementation("org.apache.tomcat", "tomcat-juli", "7.0.52") // tomcat juli
|
||||
implementation("junit", "junit", "4.12")
|
||||
|
||||
compile(project(":core"))
|
||||
}
|
||||
java {
|
||||
sourceSets {
|
||||
create("nms")
|
||||
}
|
||||
}
|
||||
|
||||
val jar by tasks.getting(Jar::class) {
|
||||
manifest {
|
||||
attributes(mapOf(
|
||||
"Implementation-Title" to "mcMMO",
|
||||
"Implementation-Version" to rootProject.properties["pluginVersion"]!!,
|
||||
"Main-Class" to "com.gmail.nossr50.mcMMO" // Main plugin class for bukkit
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
val shadowJar by tasks.getting(ShadowJar::class) {
|
||||
dependencies {
|
||||
include(project(":core"))
|
||||
include(dependency("org.bstats:bstats-bukkit:1.4"))
|
||||
}
|
||||
relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
|
||||
}
|
Reference in New Issue
Block a user