2021-07-29 03:14:29 +02:00
|
|
|
import dev.vankka.dependencydownload.task.GenerateDependencyDownloadResourceTask
|
|
|
|
|
|
|
|
configurations {
|
2023-07-11 18:50:19 +02:00
|
|
|
// Dependencies to exclude from runtime downloaded jars
|
|
|
|
runtimeDownloadExclude {
|
|
|
|
extendsFrom runtimeExclude
|
|
|
|
}
|
|
|
|
|
|
|
|
hikariOnly
|
|
|
|
hikari.extendsFrom hikariOnly, runtimeDownloadExclude
|
|
|
|
|
|
|
|
h2DriverOnly
|
|
|
|
h2Driver.extendsFrom h2DriverOnly, runtimeDownloadExclude
|
|
|
|
|
|
|
|
mysqlDriverOnly
|
|
|
|
mysqlDriver.extendsFrom mysqlDriverOnly, runtimeDownloadExclude
|
|
|
|
|
|
|
|
mariadbDriverOnly
|
|
|
|
mariadbDriver.extendsFrom mariadbDriverOnly, runtimeDownloadExclude
|
|
|
|
|
|
|
|
mcAuthLibOnly
|
|
|
|
mcAuthLib.extendsFrom mcAuthLibOnly, runtimeDownloadExclude
|
|
|
|
|
|
|
|
compileOnly.extendsFrom hikariOnly, h2DriverOnly, mysqlDriverOnly, mariadbDriverOnly, mcAuthLibOnly
|
2021-10-21 01:16:06 +02:00
|
|
|
testRuntimeOnly.extendsFrom runtimeDownloadOnly
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
|
|
|
|
2023-02-20 20:55:45 +01:00
|
|
|
tasks.register('generateResourceForHikari', GenerateDependencyDownloadResourceTask) {
|
2022-02-01 10:33:50 +01:00
|
|
|
var conf = configurations.hikari
|
|
|
|
configuration = conf
|
|
|
|
file = 'dependencies/' + conf.name + '.txt'
|
|
|
|
}
|
2023-02-20 20:55:45 +01:00
|
|
|
tasks.register('generateResourceForH2Driver', GenerateDependencyDownloadResourceTask) {
|
2021-07-29 03:14:29 +02:00
|
|
|
var conf = configurations.h2Driver
|
|
|
|
configuration = conf
|
2021-10-23 01:20:15 +02:00
|
|
|
file = 'dependencies/' + conf.name + '.txt'
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
2023-02-20 20:55:45 +01:00
|
|
|
tasks.register('generateResourceForMySQLDriver', GenerateDependencyDownloadResourceTask) {
|
2021-07-29 03:14:29 +02:00
|
|
|
var conf = configurations.mysqlDriver
|
|
|
|
configuration = conf
|
2021-10-23 01:20:15 +02:00
|
|
|
file = 'dependencies/' + conf.name + '.txt'
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
2023-07-09 20:03:48 +02:00
|
|
|
tasks.register('generateResourceForMariaDBDriver', GenerateDependencyDownloadResourceTask) {
|
|
|
|
var conf = configurations.mariadbDriver
|
|
|
|
configuration = conf
|
|
|
|
file = 'dependencies/' + conf.name + '.txt'
|
|
|
|
}
|
2023-02-20 20:55:45 +01:00
|
|
|
tasks.register('generateResourceForMCAuthLib', GenerateDependencyDownloadResourceTask) {
|
2022-05-11 18:09:41 +02:00
|
|
|
var conf = configurations.mcAuthLib
|
|
|
|
configuration = conf
|
|
|
|
file = 'dependencies/' + conf.name + '.txt'
|
|
|
|
}
|
2021-07-29 03:14:29 +02:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// API
|
|
|
|
annotationProcessor project(':api')
|
2021-10-25 01:04:46 +02:00
|
|
|
compileOnlyApi project(':common:common-api')
|
|
|
|
testImplementation project(':common:common-api')
|
2021-07-29 03:14:29 +02:00
|
|
|
|
2023-04-30 14:19:31 +02:00
|
|
|
// Unrelocate
|
|
|
|
compileOnlyApi project(':common:common-unrelocate')
|
|
|
|
|
2021-07-29 03:14:29 +02:00
|
|
|
// DependencyDownload
|
2022-04-22 19:56:11 +02:00
|
|
|
api(libs.dependencydownload.runtime)
|
2021-07-29 03:14:29 +02:00
|
|
|
|
|
|
|
// Apache Commons
|
2022-04-22 19:56:11 +02:00
|
|
|
runtimeDownloadApi(libs.commons.lang)
|
|
|
|
runtimeDownloadApi(libs.commons.io)
|
2021-07-29 03:14:29 +02:00
|
|
|
|
|
|
|
// Caffeine
|
2023-07-11 18:50:19 +02:00
|
|
|
runtimeDownloadApi(libs.caffeine)
|
2021-07-29 03:14:29 +02:00
|
|
|
|
2022-06-25 21:33:55 +02:00
|
|
|
// DynamicProxy
|
2023-07-11 18:50:19 +02:00
|
|
|
runtimeDownloadApi(libs.dynamicproxy) {
|
|
|
|
// Not needed at runtime
|
|
|
|
exclude module: 'javaparser-symbol-solver-core'
|
|
|
|
}
|
2022-06-25 21:33:55 +02:00
|
|
|
|
2022-01-25 18:14:16 +01:00
|
|
|
// Jackson (transitive in :api)
|
2022-04-22 19:56:11 +02:00
|
|
|
compileOnlyApi(libs.jackson.databind)
|
|
|
|
|
|
|
|
// Config
|
|
|
|
runtimeDownloadApi(libs.configurate.yaml)
|
2022-01-25 18:14:16 +01:00
|
|
|
|
2021-12-24 00:21:14 +01:00
|
|
|
// Logging
|
2022-04-22 19:56:11 +02:00
|
|
|
compileOnly(libs.log4j.core)
|
2021-12-24 00:21:14 +01:00
|
|
|
|
2021-07-29 03:14:29 +02:00
|
|
|
// Adventure, MCDiscordReserializer, EnhancedLegacyText
|
2022-04-22 19:56:11 +02:00
|
|
|
runtimeDownloadApi(libs.adventure.api)
|
|
|
|
runtimeDownloadApi(libs.adventure.serializer.plain)
|
|
|
|
runtimeDownloadApi(libs.adventure.serializer.legacy)
|
|
|
|
runtimeDownloadApi(libs.adventure.serializer.gson)
|
2023-06-03 22:05:57 +02:00
|
|
|
runtimeDownloadApi(libs.adventure.serializer.ansi)
|
2022-04-22 19:56:11 +02:00
|
|
|
runtimeDownloadApi(libs.mcdiscordreserializer)
|
|
|
|
runtimeDownloadApi(libs.enhancedlegacytext)
|
2022-03-20 12:46:06 +01:00
|
|
|
|
2022-02-01 10:33:50 +01:00
|
|
|
// Database
|
2023-07-11 18:50:19 +02:00
|
|
|
hikariOnly(libs.hikaricp) {
|
|
|
|
// Already provided
|
|
|
|
exclude group: 'org.slf4j'
|
|
|
|
}
|
|
|
|
h2DriverOnly(libs.h2)
|
|
|
|
mysqlDriverOnly(libs.mysql)
|
|
|
|
mariadbDriverOnly(libs.mariadb)
|
2022-04-22 19:56:11 +02:00
|
|
|
|
2022-05-11 18:09:41 +02:00
|
|
|
// MinecraftAuthentication library
|
2023-07-11 18:50:19 +02:00
|
|
|
mcAuthLibOnly(libs.minecraftauth.lib) {
|
|
|
|
// JUnit is a testing library
|
2022-05-11 18:26:02 +02:00
|
|
|
exclude group: 'junit', module: 'junit'
|
|
|
|
}
|
2022-05-11 18:09:41 +02:00
|
|
|
|
2022-04-22 19:56:11 +02:00
|
|
|
// Brigadier
|
|
|
|
compileOnlyApi(libs.brigadier)
|
2021-12-24 00:21:14 +01:00
|
|
|
|
|
|
|
// Integrations
|
2022-04-22 19:56:11 +02:00
|
|
|
compileOnlyApi(libs.luckperms)
|
2021-07-29 03:14:29 +02:00
|
|
|
}
|
|
|
|
|
2021-10-21 01:16:06 +02:00
|
|
|
processResources {
|
2021-07-29 03:14:29 +02:00
|
|
|
dependsOn(
|
|
|
|
generateRuntimeDownloadResourceForRuntimeDownloadOnly,
|
2022-02-01 10:33:50 +01:00
|
|
|
generateResourceForHikari,
|
2021-07-29 03:14:29 +02:00
|
|
|
generateResourceForH2Driver,
|
2022-05-11 18:09:41 +02:00
|
|
|
generateResourceForMySQLDriver,
|
2023-07-09 22:07:39 +02:00
|
|
|
generateResourceForMariaDBDriver,
|
2022-05-11 18:09:41 +02:00
|
|
|
generateResourceForMCAuthLib
|
2021-07-29 03:14:29 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Relocations in buildscript/relocations.gradle
|