mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Patch all eclipse deps to use a strict version
This commit is contained in:
21
build.gradle
21
build.gradle
@@ -95,6 +95,7 @@ dependencies {
|
||||
|
||||
// Mercury pulls all of these deps in, however eclipse does not specify the exact version to use so they can get updated without us knowing.
|
||||
// Depend specifically on these versions to prevent them from being updated under our feet.
|
||||
// The POM is also patched later on to as this strict versioning does not make it through.
|
||||
implementation ('org.eclipse.jdt:org.eclipse.jdt.core:[3.21.0]')
|
||||
implementation ('org.eclipse.platform:org.eclipse.compare.core:[3.6.1000]')
|
||||
implementation ('org.eclipse.platform:org.eclipse.core.commands:[3.9.800]')
|
||||
@@ -194,6 +195,18 @@ import org.w3c.dom.Document
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.Node
|
||||
|
||||
def patchPom(groovy.util.Node node) {
|
||||
node.dependencies.first().each {
|
||||
def groupId = it.get("groupId").first().value().first()
|
||||
|
||||
// Patch all eclipse deps to use a strict version
|
||||
if (groupId.startsWith("org.eclipse.")) {
|
||||
def version = it.get("version").first().value().first()
|
||||
it.get("version").first().value = new groovy.util.NodeList(["[$version]"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
plugin(MavenPublication) { publication ->
|
||||
@@ -205,6 +218,10 @@ publishing {
|
||||
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
pom.withXml {
|
||||
patchPom(asNode())
|
||||
}
|
||||
}
|
||||
|
||||
// Also publish a snapshot so people can use the latest version if they wish
|
||||
@@ -217,6 +234,10 @@ publishing {
|
||||
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
pom.withXml {
|
||||
patchPom(asNode())
|
||||
}
|
||||
}
|
||||
|
||||
// Manually crate the plugin marker for snapshot versions
|
||||
|
||||
Reference in New Issue
Block a user