mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-25 12:25:15 +01:00
Relocate kotlin, update OkHTTP, exclude dependencies in bulk
This commit is contained in:
parent
d4f41c589d
commit
9897f7029d
@ -8,13 +8,6 @@ dependencies {
|
||||
|
||||
// JDA
|
||||
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'
|
||||
|
||||
// Downgrade okhttp (due to kotlin)
|
||||
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||
|
||||
// We don't use audio
|
||||
exclude module: 'opus-java'
|
||||
}
|
||||
|
11
build.gradle
11
build.gradle
@ -26,6 +26,17 @@ subprojects {
|
||||
}
|
||||
|
||||
configurations {
|
||||
// Exclude dependencies from being included in jars
|
||||
runtimeExclude {
|
||||
// Annotations are suppose to be compile time only
|
||||
exclude group: 'org.jetbrains', module: 'annotations'
|
||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||||
}
|
||||
runtimeClasspath.extendsFrom runtimeExclude
|
||||
runtimeDownloadOnly.extendsFrom runtimeExclude
|
||||
|
||||
// Create runtimeDownloadApi configuration (compileOnlyApi + runtimeDownloadOnly)
|
||||
runtimeDownloadApi
|
||||
compileOnlyApi.extendsFrom runtimeDownloadApi
|
||||
runtimeDownloadOnly.extendsFrom runtimeDownloadApi
|
||||
|
@ -16,6 +16,9 @@
|
||||
'okhttp3',
|
||||
'okio',
|
||||
|
||||
// Kotlin
|
||||
'kotlin',
|
||||
|
||||
// DependencyDownload
|
||||
'dev.vankka.dependencydownload',
|
||||
'dev.vankka.mcdependencydownload',
|
||||
|
@ -1,12 +1,27 @@
|
||||
import dev.vankka.dependencydownload.task.GenerateDependencyDownloadResourceTask
|
||||
|
||||
configurations {
|
||||
hikari
|
||||
h2Driver
|
||||
mysqlDriver
|
||||
mariadbDriver
|
||||
mcAuthLib
|
||||
compileOnly.extendsFrom hikari, h2Driver, mysqlDriver, mariadbDriver, mcAuthLib
|
||||
// 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
|
||||
testRuntimeOnly.extendsFrom runtimeDownloadOnly
|
||||
}
|
||||
|
||||
@ -53,12 +68,13 @@ dependencies {
|
||||
runtimeDownloadApi(libs.commons.io)
|
||||
|
||||
// Caffeine
|
||||
runtimeDownloadApi(libs.caffeine) {
|
||||
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||||
}
|
||||
runtimeDownloadApi(libs.caffeine)
|
||||
|
||||
// DynamicProxy
|
||||
runtimeDownloadApi(libs.dynamicproxy)
|
||||
runtimeDownloadApi(libs.dynamicproxy) {
|
||||
// Not needed at runtime
|
||||
exclude module: 'javaparser-symbol-solver-core'
|
||||
}
|
||||
|
||||
// Jackson (transitive in :api)
|
||||
compileOnlyApi(libs.jackson.databind)
|
||||
@ -79,15 +95,18 @@ dependencies {
|
||||
runtimeDownloadApi(libs.enhancedlegacytext)
|
||||
|
||||
// Database
|
||||
hikari(libs.hikaricp)
|
||||
h2Driver(libs.h2)
|
||||
mysqlDriver(libs.mysql)
|
||||
mariadbDriver(libs.mariadb)
|
||||
hikariOnly(libs.hikaricp) {
|
||||
// Already provided
|
||||
exclude group: 'org.slf4j'
|
||||
}
|
||||
h2DriverOnly(libs.h2)
|
||||
mysqlDriverOnly(libs.mysql)
|
||||
mariadbDriverOnly(libs.mariadb)
|
||||
|
||||
// MinecraftAuthentication library
|
||||
mcAuthLib(libs.minecraftauth.lib) {
|
||||
mcAuthLibOnly(libs.minecraftauth.lib) {
|
||||
// JUnit is a testing library
|
||||
exclude group: 'junit', module: 'junit'
|
||||
exclude group: 'org.jetbrains', module: 'annotations'
|
||||
}
|
||||
|
||||
// Brigadier
|
||||
|
@ -57,10 +57,9 @@ dependencyResolutionManagement {
|
||||
|
||||
// JDA
|
||||
library('jda', 'net.dv8tion', 'JDA').version('5.0.0-beta.10.webhooks_2')
|
||||
library('okhttp', 'com.squareup.okhttp3', 'okhttp').version {
|
||||
prefer '3.14.9'
|
||||
reject '[4,)' // Kotlin
|
||||
}
|
||||
|
||||
// OkHTTP
|
||||
library('okhttp', 'com.squareup.okhttp3', 'okhttp').version('4.11.0')
|
||||
|
||||
// Apache commons
|
||||
library('commons-lang', 'org.apache.commons', 'commons-lang3').version('3.12.0')
|
||||
|
Loading…
Reference in New Issue
Block a user