mirai/mirai-bom/build.gradle.kts
AdoptOSS 8bd3d94537
Introduce mirai-bom for dependency management (#1417)
* Introduce `mirai-bom` for dependency management

* Update docs on `mirai-bom`

* Remove unnecessary `mirai-bom:publish` in workflow

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2021-10-09 09:18:58 +01:00

39 lines
1.0 KiB
Plaintext

plugins {
`java-platform`
`maven-publish`
}
description = "Mirai BOM"
rootProject.subprojects
.filter { it.path != project.path }
.forEach { project.evaluationDependsOn(it.path) }
dependencies {
constraints {
rootProject.subprojects
.filter { it.path != project.path }
.filter { it.extensions.findByName("publishing") != null }
.forEach { subProject ->
subProject.publishing.publications
.withType<MavenPublication>()
.forEach {
this@constraints.api("${it.groupId}:${it.artifactId}:${it.version}")
}
}
}
}
publishing {
publications {
create<MavenPublication>("myPlatform") {
groupId = rootProject.group.toString()
artifactId = "mirai-bom"
version = Versions.project
from(components["javaPlatform"])
setupPom(project)
configGpgSign(project)
}
}
}