mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-17 23:17:38 +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:
@@ -1,8 +1,15 @@
|
||||
package cc.tweaked.gradle
|
||||
|
||||
import org.gradle.api.artifacts.ResolvedDependency
|
||||
import org.gradle.api.artifacts.dsl.DependencyHandler
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.specs.Spec
|
||||
import org.gradle.api.tasks.JavaExec
|
||||
import org.gradle.process.JavaExecSpec
|
||||
|
||||
/**
|
||||
* Add an annotation processor to all source sets.
|
||||
*/
|
||||
fun DependencyHandler.annotationProcessorEverywhere(dep: Any) {
|
||||
add("compileOnly", dep)
|
||||
add("annotationProcessor", dep)
|
||||
@@ -14,6 +21,9 @@ fun DependencyHandler.annotationProcessorEverywhere(dep: Any) {
|
||||
add("testAnnotationProcessor", dep)
|
||||
}
|
||||
|
||||
/**
|
||||
* A version of [JavaExecSpec.copyTo] which copies *all* properties.
|
||||
*/
|
||||
fun JavaExec.copyToFull(spec: JavaExec) {
|
||||
copyTo(spec)
|
||||
spec.classpath = classpath
|
||||
|
Reference in New Issue
Block a user