mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Complete Kotlin-DSL Gradle scripting for multiple projects.
Added the shadow plugin integration with the entire project. Indvidual modules each have their designated dependencies and each will assign various dependencies based on constants now made through buildSrc. Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
import Config.Libs.Bukkit.`1_12` as Bukkit
|
||||
|
||||
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
|
||||
compileOnly(Bukkit.api) // Spigot API
|
||||
compileOnly(Bukkit.nms)
|
||||
compileOnly(Bukkit.wgLegacy) // WorldGuard
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
import Config.Libs.Bukkit.`1_13` as Bukkit
|
||||
|
||||
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
|
||||
compileOnly(Bukkit.api) // Bukkit API
|
||||
compileOnly(Bukkit.nms)
|
||||
compileOnly(Bukkit.wgCore) // WorldGuard
|
||||
compileOnly(Bukkit.wgLegacy) // WG for Bukkit
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
import Config.Libs.Bukkit.`1_8` as Bukkit
|
||||
|
||||
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
|
||||
compileOnly(Bukkit.api) // Spigot API
|
||||
compileOnly(Bukkit.wgLegacy) // Old worldguard
|
||||
compileOnly(Bukkit.nms)
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.gmail.nossr50.platform.bukkit;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.block.CraftBlock;
|
||||
|
||||
public class Testing18 {
|
||||
|
||||
Material material;
|
||||
|
||||
CraftBlock block;
|
||||
|
||||
}
|
@ -1,21 +1,18 @@
|
||||
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
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import Config.Libs.Bukkit as Bukkit
|
||||
|
||||
val bukkit: Project = Projects.bukkit!!
|
||||
val core: Project = Projects.core!!
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
// Spigot & Bukkit
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
mavenLocal() // For nms variants
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(core) // includes junit for tests
|
||||
compile("org.bstats", "bstats-bukkit", "1.4") // Bukkit bstats
|
||||
implementation(Bukkit.bstats) // Bukkit bstats
|
||||
}
|
||||
|
||||
val shadowJar by tasks.getting(ShadowJar::class) {
|
||||
relocate(Shadow.Origin.bstatsBukkit, Shadow.Target.bstatsBukkit)
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,12 +20,35 @@ 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") }
|
||||
compileOnly(bukkit)
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
java
|
||||
}
|
||||
dependencies {
|
||||
implementation("org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT") // Spigot API
|
||||
// Temporary dependencies while things are being moved.
|
||||
compileOnly(Bukkit.`1_13`.spigotApi) { // Spigot API
|
||||
isTransitive = true
|
||||
}
|
||||
compileOnly(Bukkit.`1_13`.api) { // Spigot API
|
||||
isTransitive = true
|
||||
|
||||
}
|
||||
compileOnly(Bukkit.`1_13`.wgCore) {
|
||||
isTransitive = true
|
||||
exclude(group = Shadow.Exclude.sk89q)
|
||||
exclude(group = Shadow.Exclude.intake, module = "intake")
|
||||
exclude(group = Shadow.Exclude.sk89q, module = "squirrelid")
|
||||
exclude(group = Shadow.Exclude.flyway)
|
||||
exclude(group = Shadow.Exclude.khelekore)
|
||||
exclude(group = Shadow.Exclude.findbugs)
|
||||
}
|
||||
compileOnly(Bukkit.`1_13`.wgLegacy) {
|
||||
isTransitive = true
|
||||
exclude(group = Shadow.Exclude.bukkit)
|
||||
exclude(group = Shadow.Exclude.sk89q, module = "commandbook")
|
||||
exclude(group = Shadow.Exclude.bstats)
|
||||
}
|
||||
}
|
||||
|
||||
|
12
bukkit/src/main/java/com/gmail/nossr50/BukkitBlockType.java
Normal file
12
bukkit/src/main/java/com/gmail/nossr50/BukkitBlockType.java
Normal file
@ -0,0 +1,12 @@
|
||||
package com.gmail.nossr50;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class BukkitBlockType {
|
||||
|
||||
private Material material;
|
||||
|
||||
private BlockData blockData;
|
||||
|
||||
}
|
Reference in New Issue
Block a user