mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-12-28 11:04:21 +00:00
Clean up Bukkit API exclusion, use dep constraint for SnakeYAML (#4213)
This commit is contained in:
parent
ecea17195a
commit
2018149395
6 changed files with 33 additions and 5 deletions
|
@ -13,8 +13,7 @@ dependencies {
|
|||
api 'org.bstats:bstats-bukkit:1.8'
|
||||
|
||||
implementation 'org.spongepowered:configurate-yaml:4.1.1'
|
||||
implementation 'org.yaml:snakeyaml:1.+'
|
||||
implementation 'org.checkerframework:checker-qual:3.7.1'
|
||||
implementation 'org.checkerframework:checker-qual:3.14.0'
|
||||
|
||||
// Providers
|
||||
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")
|
||||
}
|
||||
|
||||
val baseExtension = extensions.create<EssentialsBaseExtension>("essentials", project)
|
||||
|
||||
val checkstyleVersion = "8.36.2"
|
||||
val spigotVersion = "1.16.5-R0.1-SNAPSHOT"
|
||||
val junit5Version = "5.7.0"
|
||||
|
@ -17,9 +19,17 @@ dependencies {
|
|||
testImplementation("org.junit.vintage", "junit-vintage-engine", junit5Version)
|
||||
testImplementation("org.mockito", "mockito-core", mockitoVersion)
|
||||
|
||||
if (project.name != "1_8Provider" && project.name != "PaperProvider" && project.name != "NMSReflectionProvider") { // These providers use their own bukkit versions
|
||||
api("org.spigotmc", "spigot-api", spigotVersion) {
|
||||
exclude(group = "org.yaml", module = "snakeyaml")
|
||||
constraints {
|
||||
implementation("org.yaml:snakeyaml:1.28") {
|
||||
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 {
|
||||
api project(':providers:NMSReflectionProvider')
|
||||
}
|
||||
|
||||
essentials {
|
||||
injectBukkitApi.set(false)
|
||||
}
|
||||
|
|
|
@ -6,3 +6,7 @@ dependencies {
|
|||
implementation project(':providers:BaseProviders')
|
||||
api 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
essentials {
|
||||
injectBukkitApi.set(false)
|
||||
}
|
||||
|
|
|
@ -6,3 +6,7 @@ dependencies {
|
|||
implementation project(':providers:BaseProviders')
|
||||
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
essentials {
|
||||
injectBukkitApi.set(false)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue