build.gradle.kts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
  2. import Config.Libs.Bukkit as Bukkit
  3. val bukkit: Project = Projects.bukkit!!
  4. val core: Project = Projects.core!!
  5. allprojects {
  6. dependencies {
  7. compile(core) // includes junit for tests
  8. implementation(Bukkit.bstats) // Bukkit bstats
  9. }
  10. // TODO dunno if this works yet... project needs to compile.
  11. val shadowJar by tasks.getting(ShadowJar::class) {
  12. relocate(Shadow.Origin.bstatsBukkit, Shadow.Target.bstatsBukkit)
  13. relocate(Deps.Groups.nossr, "${Deps.Groups.nossr}.bukkit") {
  14. exclude("${Deps.Groups.nossr}.core")
  15. }
  16. }
  17. }
  18. subprojects {
  19. dependencies {
  20. // Provide the base bukkit plugin dependency for plugin classloading.
  21. // All "versioned" implementations will be properly classloaded by the bukkit parent
  22. compileOnly(bukkit)
  23. }
  24. }
  25. plugins {
  26. java
  27. }
  28. dependencies {
  29. // Temporary dependencies while things are being moved.
  30. compileOnly(Bukkit.`1_13`.spigotApi) { // Spigot API
  31. isTransitive = true
  32. }
  33. compileOnly(Bukkit.`1_13`.api) { // Spigot API
  34. isTransitive = true
  35. }
  36. compileOnly(Bukkit.`1_13`.wgCore) {
  37. isTransitive = true
  38. exclude(group = Shadow.Exclude.sk89q)
  39. exclude(group = Shadow.Exclude.intake, module = "intake")
  40. exclude(group = Shadow.Exclude.sk89q, module = "squirrelid")
  41. exclude(group = Shadow.Exclude.flyway)
  42. exclude(group = Shadow.Exclude.khelekore)
  43. exclude(group = Shadow.Exclude.findbugs)
  44. }
  45. compileOnly(Bukkit.`1_13`.wgLegacy) {
  46. isTransitive = true
  47. exclude(group = Shadow.Exclude.bukkit)
  48. exclude(group = Shadow.Exclude.sk89q, module = "commandbook")
  49. exclude(group = Shadow.Exclude.bstats)
  50. }
  51. }