mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-09 02:20:33 +08:00
Clean up Bukkit API exclusion, use dep constraint for SnakeYAML (#4213)
This commit is contained in:
parent
ecea17195a
commit
2018149395
@ -13,8 +13,7 @@ dependencies {
|
|||||||
api 'org.bstats:bstats-bukkit:1.8'
|
api 'org.bstats:bstats-bukkit:1.8'
|
||||||
|
|
||||||
implementation 'org.spongepowered:configurate-yaml:4.1.1'
|
implementation 'org.spongepowered:configurate-yaml:4.1.1'
|
||||||
implementation 'org.yaml:snakeyaml:1.+'
|
implementation 'org.checkerframework:checker-qual:3.14.0'
|
||||||
implementation 'org.checkerframework:checker-qual:3.7.1'
|
|
||||||
|
|
||||||
// Providers
|
// Providers
|
||||||
api project(':providers:BaseProviders')
|
api project(':providers:BaseProviders')
|
||||||
|
7
build-logic/src/main/kotlin/EssentialsBaseExtension.kt
Normal file
7
build-logic/src/main/kotlin/EssentialsBaseExtension.kt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.provider.Property
|
||||||
|
import org.gradle.kotlin.dsl.property
|
||||||
|
|
||||||
|
abstract class EssentialsBaseExtension(private val project: Project) {
|
||||||
|
val injectBukkitApi: Property<Boolean> = project.objects.property<Boolean>().convention(true)
|
||||||
|
}
|
@ -7,6 +7,8 @@ plugins {
|
|||||||
id("net.kyori.indra.publishing")
|
id("net.kyori.indra.publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val baseExtension = extensions.create<EssentialsBaseExtension>("essentials", project)
|
||||||
|
|
||||||
val checkstyleVersion = "8.36.2"
|
val checkstyleVersion = "8.36.2"
|
||||||
val spigotVersion = "1.16.5-R0.1-SNAPSHOT"
|
val spigotVersion = "1.16.5-R0.1-SNAPSHOT"
|
||||||
val junit5Version = "5.7.0"
|
val junit5Version = "5.7.0"
|
||||||
@ -17,9 +19,17 @@ dependencies {
|
|||||||
testImplementation("org.junit.vintage", "junit-vintage-engine", junit5Version)
|
testImplementation("org.junit.vintage", "junit-vintage-engine", junit5Version)
|
||||||
testImplementation("org.mockito", "mockito-core", mockitoVersion)
|
testImplementation("org.mockito", "mockito-core", mockitoVersion)
|
||||||
|
|
||||||
if (project.name != "1_8Provider" && project.name != "PaperProvider" && project.name != "NMSReflectionProvider") { // These providers use their own bukkit versions
|
constraints {
|
||||||
api("org.spigotmc", "spigot-api", spigotVersion) {
|
implementation("org.yaml:snakeyaml:1.28") {
|
||||||
exclude(group = "org.yaml", module = "snakeyaml")
|
because("Bukkit API ships old versions, Configurate requires modern versions")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
if (baseExtension.injectBukkitApi.get()) {
|
||||||
|
dependencies {
|
||||||
|
api("org.spigotmc", "spigot-api", spigotVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,3 +5,7 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api project(':providers:NMSReflectionProvider')
|
api project(':providers:NMSReflectionProvider')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
essentials {
|
||||||
|
injectBukkitApi.set(false)
|
||||||
|
}
|
||||||
|
@ -6,3 +6,7 @@ dependencies {
|
|||||||
implementation project(':providers:BaseProviders')
|
implementation project(':providers:BaseProviders')
|
||||||
api 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT'
|
api 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
essentials {
|
||||||
|
injectBukkitApi.set(false)
|
||||||
|
}
|
||||||
|
@ -6,3 +6,7 @@ dependencies {
|
|||||||
implementation project(':providers:BaseProviders')
|
implementation project(':providers:BaseProviders')
|
||||||
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
essentials {
|
||||||
|
injectBukkitApi.set(false)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user