Files
Carbon/paper/build.gradle.kts
T
Jason 307395ce5b Download dependencies at runtime on all platforms (not just Paper), and read dependency info from file in plugin jar generated by Gradle task (#259)
* Download dependencies at runtime on all platforms (not just Paper), and read dependency info from file in plugin jar generated by Gradle task

* Add maven central as fallback for paper mirror

* filter duplicate dependencies

* fix fabric runServer

* add todo

* enable hangar publishing

* - exclude unneeded deps from runtime dl
- sort deps and relocations in the list file
- other misc fixes

* move jdbi relocation

* don't log anything when we don't download or relocate any dependencies

* add back mariadb driver and download more dependencies at runtime

and other related build changes

* build cleanup

* build cleanup

* remove useless dependencies block
2023-07-04 00:24:00 -07:00

89 lines
2.2 KiB
Kotlin

plugins {
id("carbon.shadow-platform")
id("net.minecrell.plugin-yml.bukkit")
id("paper-plugin-yml")
id("xyz.jpenilla.run-paper")
id("carbon.permissions")
}
dependencies {
implementation(projects.carbonchatCommon)
// Server
compileOnly(libs.foliaApi)
implementation(libs.paperTrail)
// Commands
implementation(libs.cloudPaper)
// Misc
implementation(libs.bstatsBukkit)
// Plugins
compileOnly(libs.placeholderapi)
compileOnly(libs.miniplaceholders)
compileOnly(libs.essentialsXDiscord)
compileOnly(libs.discordsrv)
runtimeDownload(libs.guice) {
exclude("com.google.guava")
}
}
tasks {
shadowJar {
relocateDependency("io.papermc.papertrail")
relocateDependency("io.leangen.geantyref")
relocateCloud()
}
runServer {
minecraftVersion("1.20.1")
}
writeDependencies {
}
}
runPaper.folia.registerTask()
paper {
name = rootProject.name
version = project.version as String
loader = "net.draycia.carbon.paper.CarbonPaperLoader"
main = "net.draycia.carbon.paper.CarbonPaperBootstrap"
apiVersion = "1.19"
author = "Draycia"
loadAfter += PaperPluginDescription.LoadInfo("LuckPerms")
loadAfter += PaperPluginDescription.LoadInfo("EssentialsDiscord")
loadAfter += PaperPluginDescription.LoadInfo("DiscordSRV")
loadAfter += PaperPluginDescription.LoadInfo("PlaceholderAPI")
dependencies += PaperPluginDescription.Dependency("LuckPerms", true)
dependencies += PaperPluginDescription.Dependency("PlaceholderAPI", false)
dependencies += PaperPluginDescription.Dependency("EssentialsDiscord", false)
dependencies += PaperPluginDescription.Dependency("DiscordSRV", false)
dependencies += PaperPluginDescription.Dependency("MiniPlaceholders", false)
website = GITHUB_REPO_URL
foliaSupported = true
}
bukkit {
name = rootProject.name
version = project.version as String
main = "net.draycia.carbon.libs.io.papermc.papertrail.RequiresPaperPlugins"
apiVersion = "1.19"
author = "Draycia"
website = GITHUB_REPO_URL
}
carbonPermission.permissions.get().forEach {
setOf(bukkit.permissions, paper.permissions).forEach { container ->
container.register(it.string) {
description = it.description
childrenMap = it.children
}
}
}
modrinth {
loaders.addAll("paper", "folia")
}