Skip to content

Commit

Permalink
Make deprecated modules opt-out instead of opt-in (#3246)
Browse files Browse the repository at this point in the history
* Make deprecated modules opt-out instead of opt-in

* Add comment

* Update build.gradle

Co-authored-by: Juuz <[email protected]>

---------

Co-authored-by: Juuz <[email protected]>
  • Loading branch information
modmuss50 and Juuxel committed Aug 13, 2023
1 parent 96274c1 commit db99c88
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ publishing {
pom.withXml {
def depsNode = asNode().appendNode("dependencies")
subprojects.each {
// Dont depend on the deprecated modules in the main artifact.
// The maven BOM containing all of the deprecated modules is added manually below.
if (it.path.startsWith(":deprecated")) {
return
}
Expand All @@ -663,6 +663,13 @@ publishing {
depNode.appendNode("version", it.version)
depNode.appendNode("scope", "compile")
}

// Depend on the deprecated BOM to allow opting out of deprecated modules.
def depNode = depsNode.appendNode("dependency")
depNode.appendNode("groupId", group)
depNode.appendNode("artifactId", "fabric-api-deprecated")
depNode.appendNode("version", version)
depNode.appendNode("scope", "compile")
}
}
}
Expand Down

0 comments on commit db99c88

Please sign in to comment.