fabric/deprecated/build.gradle
modmuss50 df3654b364
Move deprecated modules, create own maven BOM for the deprecated modules. (#2171)
* Move deprecated modules to a sub directory.
Remove deprecated modules from the default maven pom
Create a new "fabric-api-legacy" bom with the deprecated modules.

* Fix main "fabric" project not beign a dep for the legacy bom.

* rename artifact to fabric-api-deprecated

* Spotless

* Use the latest version of spotless.
2022-05-01 15:44:16 +01:00

38 lines
1.1 KiB
Groovy

/**
* This project generates a maven bill of materials (BOM) that includes the deprecated modules, alongside the main project.
*/
apply plugin: "maven-publish"
version = rootProject.version
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'fabric-api-deprecated'
pom.withXml {
def depsNode = asNode().appendNode("dependencies")
allprojects.each {
if (it.name == "deprecated") return // Dont depend on yourself :)
// Depend on all of the deprecated projects
if (!it.path.startsWith(":deprecated")) return
def depNode = depsNode.appendNode("dependency")
depNode.appendNode("groupId", it.group)
depNode.appendNode("artifactId", it.name)
depNode.appendNode("version", it.version)
depNode.appendNode("scope", "compile")
}
// Depend on the main project.
def depNode = depsNode.appendNode("dependency")
depNode.appendNode("groupId", group)
depNode.appendNode("artifactId", "fabric-api")
depNode.appendNode("version", version)
depNode.appendNode("scope", "compile")
}
}
}
}