Version catalog, updated some versions

This commit is contained in:
Vankka 2022-04-22 20:56:11 +03:00
parent 28e75db78e
commit 60f04f1511
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0
14 changed files with 183 additions and 80 deletions

View File

@ -2,11 +2,11 @@ apply from: rootProject.file('buildscript/relocations.gradle')
dependencies {
// Annotations
compileOnlyApi 'org.jetbrains:annotations:22.0.0'
compileOnlyApi 'com.google.code.findbugs:jsr305:3.0.2'
compileOnlyApi(libs.jetbrains.annotations)
compileOnlyApi(libs.findbugs.annotations)
// JDA
api('net.dv8tion:JDA:' + rootProject.jdaVersion) {
api(libs.jda) {
// Annotations are suppose to be compile time only
exclude group: 'org.jetbrains', module: 'annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305'

View File

@ -1,27 +1,13 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.1' apply false
id 'org.cadixdev.licenser' version '0.6.1' apply false
id 'net.kyori.blossom' version '1.2.0' apply false
id 'net.kyori.indra.git' version '2.1.1' apply false
id 'dev.vankka.dependencydownload.plugin' version '1.2.2-SNAPSHOT' apply false
alias(libs.plugins.shadow) apply false
alias(libs.plugins.licenser) apply false
alias(libs.plugins.blossom) apply false
alias(libs.plugins.indra.git) apply false
alias(libs.plugins.dependencydownload.plugin) apply false
}
version '2.0.0-SNAPSHOT'
ext {
// DependencyDownload (change plugin version above)
ddVersion = '1.2.2-SNAPSHOT'
// MinecraftDependencyDownload
mddVersion = '1.0.0-SNAPSHOT'
// JDA
jdaVersion = '5.0.0-alpha.9'
// Configurate
configurateVersion = '4.1.2'
// Adventure & Adventure Platform
adventureVersion = '4.10.0'
adventurePlatformVersion = '4.1.0'
}
allprojects {
apply plugin: 'java'
apply plugin: 'java-library'
@ -42,6 +28,10 @@ allprojects {
runtimeDownloadApi
compileOnlyApi.extendsFrom runtimeDownloadApi
runtimeDownloadOnly.extendsFrom runtimeDownloadApi
all {
resolutionStrategy.failOnDynamicVersions()
}
}
generateRuntimeDownloadResourceForRuntimeDownloadOnly {
@ -74,8 +64,8 @@ allprojects {
dependencies {
// Test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation(libs.jupiter.api)
testRuntimeOnly(libs.jupiter.engine)
}
test {
@ -97,15 +87,15 @@ allprojects {
finalizedBy shadowJar
manifest.attributes(
"Specification-Title": "DiscordSRV",
"Specification-Vendor": "DiscordSRV",
"Specification-Version": project.version
'Specification-Title': 'DiscordSRV',
'Specification-Vendor': 'DiscordSRV',
'Specification-Version': project.version
)
if (project.name != "api") {
manifest.attributes(
"Implementation-Title": "DiscordSRV",
"Implementation-Vendor": "DiscordSRV",
"Implementation-Version": project.version
'Implementation-Title': 'DiscordSRV',
'Implementation-Vendor': 'DiscordSRV',
'Implementation-Version': project.version
)
}
if (indraGit.isPresent()) {

View File

@ -33,6 +33,8 @@ allprojects {
}
filter {
includeGroup 'com.destroystokyo.paper'
includeGroup 'io.papermc'
includeGroup 'org.spigotmc'
}
}
@ -48,7 +50,7 @@ allprojects {
dependencies {
// Platform
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly(libs.paperapi.old)
}
}
@ -61,13 +63,14 @@ dependencies {
implementation project(path: ':common:common-server', configuration: 'runtimeElements')
// DependencyDownload
implementation 'dev.vankka:minecraftdependencydownload-bukkit:' + rootProject.mddVersion
implementation(libs.mcdependencydownload.bukkit.bootstrap)
// Adventure
runtimeDownloadApi 'net.kyori:adventure-platform-bukkit:' + rootProject.adventurePlatformVersion
runtimeDownloadApi(libs.adventure.api)
runtimeDownloadApi(libs.adventure.platform.bukkit)
// Commodore
commodore('me.lucko:commodore:1.13') {
commodore(libs.commodore) {
// We only use commodore when it's included in the server, so we don't want to download it
exclude module: 'brigadier'
// We don't use the commodore file format
@ -75,7 +78,7 @@ dependencies {
}
// Integrations
compileOnly 'net.milkbowl.vault:VaultAPI:1.7'
compileOnly(libs.vaultapi)
}
processResources {

View File

@ -7,7 +7,7 @@ dependencies {
implementation project(':common:common-api')
// DependencyDownload
implementation 'dev.vankka:minecraftdependencydownload-bukkit-loader:' + rootProject.mddVersion
implementation(libs.mcdependencydownload.bukkit.loader)
}
processResources {

View File

@ -25,7 +25,7 @@ allprojects {
dependencies {
// Platform
compileOnly 'net.md-5:bungeecord-api:1.17-R0.1-SNAPSHOT'
compileOnly(libs.bungee)
}
}
@ -37,9 +37,9 @@ dependencies {
implementation project(':common:common-proxy')
// DependencyDownload
implementation 'dev.vankka:minecraftdependencydownload-bungee:' + rootProject.mddVersion
implementation(libs.mcdependencydownload.bungee.bootstrap)
// Adventure
runtimeDownloadApi 'net.kyori:adventure-platform-bungeecord:' + rootProject.adventurePlatformVersion
runtimeDownloadApi 'net.kyori:adventure-text-serializer-bungeecord:' + rootProject.adventurePlatformVersion
runtimeDownloadApi(libs.adventure.platform.bungee)
runtimeDownloadApi(libs.adventure.serializer.bungee)
}

View File

@ -7,7 +7,7 @@ dependencies {
implementation project(':common:common-api')
// DependencyDownload
implementation 'dev.vankka:minecraftdependencydownload-bungee-loader:' + rootProject.mddVersion
implementation(libs.mcdependencydownload.bungee.loader)
}
processResources {

View File

@ -3,5 +3,5 @@ dependencies {
api project(':api')
// Logging
api 'org.slf4j:slf4j-api:1.7.32'
api(libs.slf4j.api)
}

View File

@ -33,49 +33,49 @@ dependencies {
testImplementation project(':common:common-api')
// DependencyDownload
api 'dev.vankka:dependencydownload-runtime:' + rootProject.ddVersion
api(libs.dependencydownload.runtime)
// Discord Webhooks
runtimeDownloadApi 'club.minnced:discord-webhooks:0.7.5'
runtimeDownloadApi(libs.webhooks)
// Apache Commons
runtimeDownloadApi 'org.apache.commons:commons-lang3:3.12.0'
runtimeDownloadApi 'commons-io:commons-io:2.10.0'
runtimeDownloadApi(libs.commons.lang)
runtimeDownloadApi(libs.commons.io)
// Caffeine
runtimeDownloadApi('com.github.ben-manes.caffeine:caffeine:2.9.2') {
runtimeDownloadApi(libs.caffeine) {
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
}
// Config
runtimeDownloadApi 'org.spongepowered:configurate-yaml:' + rootProject.configurateVersion
runtimeDownloadApi 'org.spongepowered:configurate-hocon:' + rootProject.configurateVersion
// Jackson (transitive in :api)
compileOnlyApi 'com.fasterxml.jackson.core:jackson-databind:2.10.1'
compileOnlyApi(libs.jackson.databind)
// Config
runtimeDownloadApi(libs.configurate.yaml)
runtimeDownloadApi(libs.configurate.hocon)
// Logging
compileOnlyApi project(':common:common-slf4j-hack')
compileOnly 'org.apache.logging.log4j:log4j-core:2.0-beta9'
compileOnly(libs.log4j.core)
// Adventure, MCDiscordReserializer, EnhancedLegacyText
runtimeDownloadApi 'net.kyori:adventure-api:' + rootProject.adventureVersion
runtimeDownloadApi 'net.kyori:adventure-text-serializer-plain:' + rootProject.adventureVersion
runtimeDownloadApi 'net.kyori:adventure-text-serializer-legacy:' + rootProject.adventureVersion
runtimeDownloadApi 'net.kyori:adventure-text-serializer-gson:' + rootProject.adventureVersion
runtimeDownloadApi 'dev.vankka:mcdiscordreserializer:4.3.0'
runtimeDownloadApi 'dev.vankka:enhancedlegacytext:1.0.0-SNAPSHOT'
// Brigadier
compileOnlyApi 'com.mojang:brigadier:1.0.18'
runtimeDownloadApi(libs.adventure.api)
runtimeDownloadApi(libs.adventure.serializer.plain)
runtimeDownloadApi(libs.adventure.serializer.legacy)
runtimeDownloadApi(libs.adventure.serializer.gson)
runtimeDownloadApi(libs.mcdiscordreserializer)
runtimeDownloadApi(libs.enhancedlegacytext)
// Database
hikari('com.zaxxer:HikariCP:4.0.3') { exclude group: 'org.slf4j' }
h2Driver 'com.h2database:h2:2.1.210'
mysqlDriver 'mysql:mysql-connector-java:8.0.25'
hikari(libs.hikaricp) { exclude group: 'org.slf4j' }
h2Driver(libs.h2)
mysqlDriver(libs.mysql)
// Brigadier
compileOnlyApi(libs.brigadier)
// Integrations
compileOnlyApi 'net.luckperms:api:5.3'
compileOnlyApi(libs.luckperms)
}
processResources {
@ -87,4 +87,8 @@ processResources {
)
}
repositories {
mavenCentral()
}
// Relocations in buildscript/relocations.gradle

View File

@ -1,3 +1,3 @@
dependencies {
api 'org.slf4j:slf4j-api:1.7.32'
api(libs.slf4j.api)
}

View File

@ -21,8 +21,8 @@ dependencies {
implementation(project(':sponge')) { transitive = false }
implementation(project(':velocity')) { transitive = false }
api 'org.spongepowered:configurate-yaml:' + rootProject.configurateVersion
api 'org.spongepowered:configurate-hocon:' + rootProject.configurateVersion
api(libs.configurate.yaml)
api(libs.configurate.hocon)
}
application {

View File

@ -6,6 +6,114 @@ pluginManagement {
}
}
dependencyResolutionManagement {
versionCatalogs {
libs {
// Buildscript
plugin('shadow', 'com.github.johnrengelman.shadow').version('7.1.1')
plugin('licenser', 'org.cadixdev.licenser').version('0.6.1')
plugin('blossom', 'net.kyori.blossom').version('1.3.0')
plugin('indra-git', 'net.kyori.indra.git').version('2.1.1')
// Bukkit
version('bukkit', '1.16.5-R0.1-SNAPSHOT')
library('paperapi', 'io.papermc.paper', 'paper-api').versionRef('bukkit')
library('paperapi-old', 'com.destroystokyo.paper', 'paper-api').versionRef('bukkit')
library('spigotapi', 'org.spigotmc', 'spigot-api').versionRef('bukkit')
// Bungee
library('bungee', 'net.md-5', 'bungeecord-api').version('1.17-R0.1-SNAPSHOT')
// Sponge
version('sponge', '8.0.0')
library('spongeapi', 'org.spongepowered', 'spongeapi').versionRef('sponge')
plugin('spongeplugin', 'org.spongepowered.gradle.plugin').version('2.0.0')
// Velocity
library('velocity', 'com.velocitypowered', 'velocity-api').version('3.0.0')
// DependencyDownload
version('dependencydownload', '1.2.2-SNAPSHOT')
plugin('dependencydownload-plugin', 'dev.vankka.dependencydownload.plugin').versionRef('dependencydownload')
library('dependencydownload-runtime', 'dev.vankka', 'dependencydownload-runtime').versionRef('dependencydownload')
library('dependencydownload-jarinjar-bootstrap', 'dev.vankka', 'dependencydownload-jarinjar-bootstrap').versionRef('dependencydownload')
library('dependencydownload-jarinjar-loader', 'dev.vankka', 'dependencydownload-jarinjar-loader').versionRef('dependencydownload')
// MinecraftDependencyDownload
version('mcdependencydownload', '1.0.0-SNAPSHOT')
library('mcdependencydownload-bukkit-bootstrap', 'dev.vankka', 'minecraftdependencydownload-bukkit').versionRef('mcdependencydownload')
library('mcdependencydownload-bukkit-loader', 'dev.vankka', 'minecraftdependencydownload-bukkit').versionRef('mcdependencydownload')
library('mcdependencydownload-bungee-bootstrap', 'dev.vankka', 'minecraftdependencydownload-bungee').versionRef('mcdependencydownload')
library('mcdependencydownload-bungee-loader', 'dev.vankka', 'minecraftdependencydownload-bungee').versionRef('mcdependencydownload')
library('mcdependencydownload-velocity', 'dev.vankka', 'minecraftdependencydownload-velocity').versionRef('mcdependencydownload')
// Annotations
library('jetbrains-annotations', 'org.jetbrains', 'annotations').version('23.0.0')
library('findbugs-annotations', 'com.google.code.findbugs', 'jsr305').version('3.0.2')
// JDA
library('jda', 'net.dv8tion', 'JDA').version('5.0.0-alpha.10')
// Discord Webhooks
library('webhooks', 'club.minnced', 'discord-webhooks').version('0.8.0')
// Apache commons
library('commons-lang', 'org.apache.commons', 'commons-lang3').version('3.12.0')
library('commons-io', 'commons-io', 'commons-io').version('2.10.0')
// Caffeine
library('caffeine', 'com.github.ben-manes.caffeine', 'caffeine').version('2.9.2')
// Jackson
library('jackson-databind', 'com.fasterxml.jackson.core', 'jackson-databind').version('2.10.1')
// Config(urate)
version('configurate', '4.1.2')
library('configurate-yaml', 'org.spongepowered', 'configurate-yaml').versionRef('configurate')
library('configurate-hocon', 'org.spongepowered', 'configurate-hocon').versionRef('configurate')
// DB
library('hikaricp', 'com.zaxxer', 'HikariCP').version('4.0.3')
library('h2', 'com.h2database', 'h2').version('2.1.210')
library('mysql', 'mysql', 'mysql-connector-java').version('8.0.28')
// Brigadier & Commodore
library('brigadier', 'com.mojang', 'brigadier').version('1.0.18')
library('commodore', 'me.lucko', 'commodore').version('1.13')
// Integrations
library('luckperms', 'net.luckperms', 'api').version('5.4')
library('vaultapi', 'net.milkbowl.vault', 'VaultAPI').version('1.7')
// Logging
library('slf4j-api', 'org.slf4j', 'slf4j-api').version('1.7.36')
library('log4j-core', 'org.apache.logging.log4j', 'log4j-core').version('2.0-beta9')
// Adventure
version('adventure', '4.10.1')
library('adventure-api', 'net.kyori', 'adventure-api').versionRef('adventure')
library('adventure-serializer-plain', 'net.kyori', 'adventure-text-serializer-plain').versionRef('adventure')
library('adventure-serializer-legacy', 'net.kyori', 'adventure-text-serializer-legacy').versionRef('adventure')
library('adventure-serializer-gson', 'net.kyori', 'adventure-text-serializer-gson').versionRef('adventure')
// Adventure Platform
version('adventure-platform', '4.1.0')
library('adventure-platform-bukkit', 'net.kyori', 'adventure-platform-bukkit').versionRef('adventure-platform')
library('adventure-platform-bungee', 'net.kyori', 'adventure-platform-bungeecord').versionRef('adventure-platform')
library('adventure-serializer-bungee', 'net.kyori', 'adventure-text-serializer-bungeecord').versionRef('adventure-platform')
// MCDiscordReserializer & EnhancedLegacyText
library('mcdiscordreserializer', 'dev.vankka', 'mcdiscordreserializer').version('4.3.0')
library('enhancedlegacytext', 'dev.vankka', 'enhancedlegacytext').version('1.0.0-SNAPSHOT')
// JUnit
version('junit', '5.8.2')
library('jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
library('jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
}
}
}
rootProject.name = 'DiscordSRV2'
[

View File

@ -6,7 +6,6 @@ shadowJar {
// Relocations in buildscript/relocations.gradle
}
var spongeVersion = '8.0.0'
allprojects {
repositories {
exclusiveContent {
@ -21,8 +20,8 @@ allprojects {
dependencies {
// Platform
annotationProcessor 'org.spongepowered:spongeapi:' + spongeVersion
compileOnly 'org.spongepowered:spongeapi:' + spongeVersion
annotationProcessor(libs.spongeapi)
compileOnly(libs.spongeapi)
}
}
@ -34,6 +33,6 @@ dependencies {
implementation project(':common:common-server')
// Dependency Download
implementation 'dev.vankka:dependencydownload-jarinjar-bootstrap:' + rootProject.ddVersion
implementation(libs.dependencydownload.jarinjar.bootstrap)
compileOnlyApi project(':sponge:sponge-loader')
}

View File

@ -2,7 +2,7 @@ import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.plugin.metadata.model.PluginDependency
plugins {
id 'org.spongepowered.gradle.plugin' version '2.0.0'
alias(libs.plugins.spongeplugin)
}
apply from: rootProject.file('buildscript/loader.gradle')
@ -12,7 +12,7 @@ dependencies {
implementation project(':common:common-api')
// DependencyDownload
implementation 'dev.vankka:dependencydownload-jarinjar-loader:' + rootProject.ddVersion
implementation(libs.dependencydownload.jarinjar.loader)
}
shadowJar {
@ -22,7 +22,7 @@ shadowJar {
// buildscript/loader.gradle includes the jarinjar in the jar
sponge {
apiVersion('8.0.0-SNAPSHOT')
apiVersion(libs.versions.sponge.get())
license('GPLv3')
loader {
name(PluginLoaders.JAVA_PLAIN)

View File

@ -18,7 +18,6 @@ repositories {
}
}
var velocityVersion = '3.0.0'
dependencies {
// API
annotationProcessor project(':api')
@ -28,11 +27,11 @@ dependencies {
implementation project(':common:common-proxy')
// Platform
annotationProcessor 'com.velocitypowered:velocity-api:' + velocityVersion
compileOnly 'com.velocitypowered:velocity-api:' + velocityVersion
annotationProcessor(libs.velocity)
compileOnly(libs.velocity)
// DependencyDownload
implementation 'dev.vankka.minecraftdependencydownload:velocity:' + rootProject.mddVersion
implementation(libs.mcdependencydownload.velocity)
}
jar {