mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-26 12:35:20 +01:00
91 lines
2.3 KiB
Groovy
91 lines
2.3 KiB
Groovy
import dev.vankka.dependencydownload.task.GenerateDependencyDownloadResourceTask
|
|
|
|
shadowJar {
|
|
archiveFileName = 'bukkit.jarinjar'
|
|
|
|
configure {
|
|
[
|
|
'net.kyori',
|
|
'me.lucko.commodore'
|
|
].each {
|
|
relocate it, 'com.discordsrv.dependencies.' + it
|
|
}
|
|
}
|
|
// More relocations in buildscript/relocations.gradle
|
|
}
|
|
|
|
apply from: rootProject.file('buildscript/runtime.gradle')
|
|
|
|
configurations {
|
|
commodore
|
|
compileOnly.extendsFrom commodore
|
|
}
|
|
|
|
task generateResourceForCommodore(type: GenerateDependencyDownloadResourceTask) {
|
|
var conf = configurations.commodore
|
|
configuration = conf
|
|
file = 'dependencies/' + conf.name + '.txt'
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
exclusiveContent {
|
|
forRepository {
|
|
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
|
}
|
|
filter {
|
|
includeGroup 'com.destroystokyo.paper'
|
|
includeGroup 'io.papermc'
|
|
includeGroup 'org.spigotmc'
|
|
}
|
|
}
|
|
|
|
exclusiveContent {
|
|
forRepository {
|
|
maven { url 'https://nexus.scarsz.me/content/groups/public/' }
|
|
}
|
|
filter {
|
|
includeGroup 'net.milkbowl.vault'
|
|
includeGroup 'me.clip'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Platform
|
|
compileOnly(libs.paperapi.old)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// API
|
|
annotationProcessor project(':api')
|
|
|
|
// Common
|
|
compileOnly project(':common:common-server')
|
|
implementation project(path: ':common:common-server', configuration: 'runtimeElements')
|
|
|
|
// DependencyDownload
|
|
implementation(libs.mcdependencydownload.bukkit.bootstrap)
|
|
|
|
// Adventure
|
|
runtimeDownloadApi(libs.adventure.api)
|
|
runtimeDownloadApi(libs.adventure.platform.bukkit)
|
|
|
|
// Commodore
|
|
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
|
|
exclude module: 'commodore-file'
|
|
}
|
|
|
|
// Integrations
|
|
compileOnly(libs.vaultapi)
|
|
compileOnly(libs.placeholderapi.bukkit)
|
|
}
|
|
|
|
processResources {
|
|
dependsOn(generateResourceForCommodore)
|
|
}
|