Opt in future proof gradle features 🚀 (#2950)

* Opt in future proof gradle features

* Resolve merge conflicts
This commit is contained in:
NotMyFault 2021-04-30 09:50:22 +02:00 committed by GitHub
parent ffe298710d
commit 1750dd3b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 141 additions and 46 deletions

View File

@ -32,44 +32,40 @@ repositories {
} }
dependencies { dependencies {
api(project(":PlotSquared-Core")) api(projects.plotSquaredCore)
//
// Implementation details
//
// Metrics // Metrics
implementation("org.bstats:bstats-bukkit:2.2.1") implementation(libs.bstats)
// Minecraft // Paper
compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT") compileOnlyApi(libs.paper)
implementation("io.papermc:paperlib:1.0.6") implementation(libs.paperlib)
// Plugins // Plugins
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.2") { compileOnly(libs.worldeditBukkit) {
exclude(group = "org.bukkit") exclude(group = "org.bukkit")
exclude(group = "org.spigotmc") exclude(group = "org.spigotmc")
} }
compileOnly("com.github.MilkBowl:VaultAPI:1.7") { compileOnly(libs.vault) {
exclude(group = "org.bukkit") exclude(group = "org.bukkit")
} }
compileOnly("me.clip:placeholderapi:2.10.9") compileOnly(libs.placeholderapi)
compileOnly("net.luckperms:api:5.3") compileOnly(libs.luckperms)
compileOnly("net.ess3:EssentialsX:2.18.2") compileOnly(libs.essentialsx)
compileOnly("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT") { isTransitive = false } compileOnly(libs.hyperverse) { isTransitive = false }
compileOnly("be.maximvdw:MVdWPlaceholderAPI:3.1.1") { isTransitive = false } compileOnly(libs.mvdwapi) { isTransitive = false }
// Other libraries // Other libraries
implementation("com.sk89q:squirrelid:1.0.0-SNAPSHOT") { isTransitive = false } implementation(libs.squirrelid) { isTransitive = false }
implementation("org.incendo.serverlib:ServerLib:2.1.0") implementation(libs.serverlib)
// Our libraries // Our libraries
implementation("com.intellectualsites.arkitektonika:Arkitektonika-Client:2.0-SNAPSHOT") implementation(libs.arkitektonika)
implementation("com.intellectualsites.http:HTTP4J:1.1-SNAPSHOT") implementation(libs.http4j)
implementation("com.intellectualsites.paster:Paster:1.0.2-SNAPSHOT") implementation(libs.paster)
// Adventure // Adventure
implementation("net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT") implementation(libs.platform)
} }
tasks.processResources { tasks.processResources {

View File

@ -2,56 +2,56 @@ import java.time.format.DateTimeFormatter
dependencies { dependencies {
// Expected everywhere. // Expected everywhere.
compileOnlyApi("org.checkerframework:checker-qual:3.12.0") compileOnlyApi(libs.checkerqual)
// Minecraft expectations // Minecraft expectations
compileOnlyApi("com.google.guava:guava:21.0") { compileOnlyApi(libs.guava) {
because("Minecraft uses 21.0") because("Minecraft uses 21.0")
} }
compileOnlyApi("com.google.code.gson:gson:2.8.0") { compileOnlyApi(libs.gson) {
because("Minecraft uses 2.8.0") because("Minecraft uses 2.8.0")
} }
// Platform expectations // Platform expectations
compileOnlyApi("org.yaml:snakeyaml:1.27") { compileOnlyApi(libs.snakeyaml) {
because("Bukkit uses 1.27") because("Bukkit uses 1.27")
} }
// Adventure stuff // Adventure
api("net.kyori:adventure-api:4.7.0") api(libs.adventure)
api("net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT") api(libs.minimessage)
// Guice // Guice
api("com.google.inject:guice:5.0.1") { api(libs.guice) {
exclude(group = "com.google.guava") exclude(group = "com.google.guava")
} }
api("com.google.inject.extensions:guice-assistedinject:5.0.1") { api(libs.guiceassistedinject) {
exclude("com.google.inject", "guice") exclude("com.google.inject", "guice")
} }
compileOnlyApi("com.google.code.findbugs:annotations:3.0.1") compileOnlyApi(libs.findbugs)
// Plugins // Plugins
compileOnlyApi("com.sk89q.worldedit:worldedit-core:7.2.2") { compileOnlyApi(libs.worldeditCore) {
exclude(group = "bukkit-classloader-check") exclude(group = "bukkit-classloader-check")
exclude(group = "mockito-core") exclude(group = "mockito-core")
exclude(group = "dummypermscompat") exclude(group = "dummypermscompat")
} }
testImplementation("com.sk89q.worldedit:worldedit-core:7.2.2") testImplementation(libs.worldeditCore)
// Logging // Logging
api("org.slf4j:slf4j-api:1.7.25") api(libs.slf4j)
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1") { runtimeOnly(libs.log4j) {
exclude(group = "org.slf4j") exclude(group = "org.slf4j")
} }
// Other libraries // Other libraries
api("org.khelekore:prtree:1.7.0-SNAPSHOT") api(libs.prtree)
api("aopalliance:aopalliance:1.0") api(libs.aopalliance)
api("com.intellectualsites:Pipeline:1.4.0-SNAPSHOT") { api(libs.pipeline) {
exclude(group = "com.google.guava") exclude(group = "com.google.guava")
} }
api("com.intellectualsites.arkitektonika:Arkitektonika-Client:2.0-SNAPSHOT") api(libs.arkitektonika)
api("com.intellectualsites.paster:Paster:1.0.2-SNAPSHOT") api(libs.paster)
} }
tasks.processResources { tasks.processResources {

View File

@ -82,9 +82,10 @@ allprojects {
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
} }
configure<JavaPluginConvention> { plugins.withId("java") {
sourceCompatibility = JavaVersion.VERSION_1_8 the<JavaPluginExtension>().toolchain {
targetCompatibility = sourceCompatibility languageVersion.set(JavaLanguageVersion.of(11))
}
} }
configure<LicenseExtension> { configure<LicenseExtension> {
@ -120,7 +121,7 @@ allprojects {
name.set("Alexander Söderberg") name.set("Alexander Söderberg")
} }
developer { developer {
id.set("N0tMyFaultOG") id.set("NotMyFault")
name.set("NotMyFault") name.set("NotMyFault")
} }
developer { developer {

95
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,95 @@
[versions]
checker-qual = "3.12.0"
guava = "21.0"
gson = "2.8.0"
snakeyaml = "1.27"
adventure-api = "4.7.0"
adventure-text-minimessage = "4.0.0-SNAPSHOT"
adventure-platform-bukkit = "4.0.0-SNAPSHOT"
guice = "5.0.1"
findbugs = "3.0.1"
worldedit = "7.2.5"
vault = "1.7"
placeholderapi = "2.10.9"
luckperms = "5.3"
essentialsx = "2.18.2"
hyperverse = "0.6.0-SNAPSHOT"
slf4j-api = "1.7.25"
log4j-slf4j-impl = "2.8.1"
prtree = "1.7.0-SNAPSHOT"
aopalliance = "1.0"
pipeline = "1.4.0-SNAPSHOT"
arkitektonika = "2.0-SNAPSHOT"
paster = "1.0.2-SNAPSHOT"
bstats = "2.2.1"
paper = "1.16.5-R0.1-SNAPSHOT"
paperlib = "1.0.6"
mvdwapi = "3.1.1"
squirrelid = "1.0.0-SNAPSHOT"
serverlib = "2.1.0"
http4j = "1.1-SNAPSHOT"
[libraries]
# Expected everywhere.
checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checker-qual" }
# Minecraft expectations
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
# Platform expectations
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
# Adventure
adventure = { group = "net.kyori", name = "adventure-api", version.ref = "adventure-api" }
minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure-text-minimessage" }
platform = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventure-platform-bukkit" }
# Guice
guice = { group = "com.google.inject", name = "guice", version.ref = "guice" }
guiceassistedinject = { group = "com.google.inject.extensions", name = "guice-assistedinject", version.ref = "guice" }
findbugs = { group = "com.google.code.findbugs", name = "annotations", version.ref = "findbugs" }
# Plugins
worldeditCore = { group = "com.sk89q.worldedit", name = "worldedit-core", version.ref = "worldedit" }
worldeditBukkit = { group = "com.sk89q.worldedit", name = "worldedit-bukkit", version.ref = "worldedit" }
vault = { group = "com.github.MilkBowl", name = "VaultAPI", version.ref = "vault" }
placeholderapi = { group = "me.clip", name = "placeholderapi", version.ref = "placeholderapi" }
luckperms = { group = "net.luckperms", name = "api", version.ref = "luckperms" }
essentialsx = { group = "net.ess3", name = "EssentialsX", version.ref = "essentialsx" }
hyperverse = { group = "se.hyperver.hyperverse", name = "Core", version.ref = "hyperverse" }
# Logging
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
log4j = { group = "org.apache.logging.log4j", name = "log4j-slf4j-impl", version.ref = "log4j-slf4j-impl" }
# Other libraries
prtree = { group = "org.khelekore", name = "prtree", version.ref = "prtree" }
aopalliance = { group = "aopalliance", name = "aopalliance", version.ref = "aopalliance" }
pipeline = { group = "com.intellectualsites", name = "Pipeline", version.ref = "pipeline" }
mvdwapi = { group = "be.maximvdw", name = "MVdWPlaceholderAPI", version.ref = "mvdwapi" }
squirrelid = { group = "com.sk89q", name = "squirrelid", version.ref = "squirrelid" }
serverlib = { group = "org.incendo.serverlib", name = "ServerLib", version.ref = "serverlib" }
# Our libraries
arkitektonika = { group = "com.intellectualsites.arkitektonika", name = "Arkitektonika-Client", version.ref = "arkitektonika" }
http4j = { group = "com.intellectualsites.http", name = "HTTP4J", version.ref = "http4j" }
paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" }
# Metrics
bstats = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
# Paper
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" }

View File

@ -3,4 +3,7 @@ rootProject.name = "PlotSquared"
include("Core", "Bukkit") include("Core", "Bukkit")
project(":Core").name = "PlotSquared-Core" project(":Core").name = "PlotSquared-Core"
project(":Bukkit").name = "PlotSquared-Bukkit" project(":Bukkit").name = "PlotSquared-Bukkit"
enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")