Ascension/common/build.gradle

101 lines
3.0 KiB
Groovy

import dev.vankka.dependencydownload.task.GenerateDependencyDownloadResourceTask
configurations {
hikari
h2Driver
mysqlDriver
mcAuthLib
compileOnly.extendsFrom hikari, h2Driver, mysqlDriver, mcAuthLib
testRuntimeOnly.extendsFrom runtimeDownloadOnly
}
task generateResourceForHikari(type: GenerateDependencyDownloadResourceTask) {
var conf = configurations.hikari
configuration = conf
file = 'dependencies/' + conf.name + '.txt'
relocate 'com.zaxxer.hikari', 'com.discordsrv.dependencies.com.zaxxer.hikari'
relocate 'org.slf4j', 'com.discordsrv.dependencies.org.slf4j'
}
task generateResourceForH2Driver(type: GenerateDependencyDownloadResourceTask) {
var conf = configurations.h2Driver
configuration = conf
file = 'dependencies/' + conf.name + '.txt'
}
task generateResourceForMySQLDriver(type: GenerateDependencyDownloadResourceTask) {
var conf = configurations.mysqlDriver
configuration = conf
file = 'dependencies/' + conf.name + '.txt'
}
task generateResourceForMCAuthLib(type: GenerateDependencyDownloadResourceTask) {
var conf = configurations.mcAuthLib
configuration = conf
file = 'dependencies/' + conf.name + '.txt'
}
dependencies {
// API
annotationProcessor project(':api')
compileOnlyApi project(':common:common-api')
testImplementation project(':common:common-api')
// DependencyDownload
api(libs.dependencydownload.runtime)
// Discord Webhooks
runtimeDownloadApi(libs.webhooks)
// Apache Commons
runtimeDownloadApi(libs.commons.lang)
runtimeDownloadApi(libs.commons.io)
// Caffeine
runtimeDownloadApi(libs.caffeine) {
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
}
// Jackson (transitive in :api)
compileOnlyApi(libs.jackson.databind)
// Config
runtimeDownloadApi(libs.configurate.yaml)
runtimeDownloadApi(libs.configurate.hocon)
// Logging
compileOnlyApi project(':common:common-unrelocate')
compileOnly(libs.log4j.core)
// Adventure, MCDiscordReserializer, EnhancedLegacyText
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(libs.hikaricp) { exclude group: 'org.slf4j' }
h2Driver(libs.h2)
mysqlDriver(libs.mysql)
// MinecraftAuthentication library
mcAuthLib(libs.minecraftauth.lib)
// Brigadier
compileOnlyApi(libs.brigadier)
// Integrations
compileOnlyApi(libs.luckperms)
}
processResources {
dependsOn(
generateRuntimeDownloadResourceForRuntimeDownloadOnly,
generateResourceForHikari,
generateResourceForH2Driver,
generateResourceForMySQLDriver,
generateResourceForMCAuthLib
)
}
// Relocations in buildscript/relocations.gradle