build.gradle.kts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2019-2021 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/dev/LICENSE
  8. */
  9. plugins {
  10. `java-platform`
  11. `maven-publish`
  12. }
  13. description = "Mirai BOM"
  14. rootProject.subprojects
  15. .filter { it.path != project.path }
  16. .forEach { project.evaluationDependsOn(it.path) }
  17. dependencies {
  18. constraints {
  19. rootProject.subprojects
  20. .filter { it.path != project.path }
  21. .filter { it.extensions.findByName("publishing") != null }
  22. .forEach { subProject ->
  23. subProject.publishing.publications
  24. .withType<MavenPublication>()
  25. .forEach {
  26. [email protected]("${it.groupId}:${it.artifactId}:${it.version}")
  27. }
  28. }
  29. }
  30. }
  31. configurePublishing(
  32. "mirai-bom",
  33. addProjectComponents = false,
  34. setupGpg = false,
  35. )
  36. publishing.publications.getByName<MavenPublication>("mavenJava") {
  37. from(components["javaPlatform"])
  38. }
  39. publishing {
  40. configGpgSign(project)
  41. }