mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-25 19:07:39 +00:00
Various improvements to packaging
This fixes several issues I had with consuming multi-loader CC:T in various upstream mods. - Include /all/ sources in the Forge/Fabric jar. Before it was just the common classes, and not the core or API. - Use some Gradle magic to remove superfluous dependencies from the POM file. Also make sure Cobalt and Netty are present as dependencies. - Start using minimize() in our shadow jar config again.
This commit is contained in:
12
buildSrc/src/main/kotlin/cc/tweaked/gradle/XmlUtil.kt
Normal file
12
buildSrc/src/main/kotlin/cc/tweaked/gradle/XmlUtil.kt
Normal file
@@ -0,0 +1,12 @@
|
||||
package cc.tweaked.gradle
|
||||
|
||||
import groovy.util.Node
|
||||
import groovy.util.NodeList
|
||||
|
||||
object XmlUtil {
|
||||
fun findChild(node: Node, name: String): Node? = when (val child = node.get(name)) {
|
||||
is Node -> child
|
||||
is NodeList -> child.singleOrNull() as Node?
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user