mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-05-10 03:14:12 +00:00
Add back inputs on processResources
I kinda thought that Gradle would be smart enough to know that these were input (given they're passed to expand), but apparently not :/.
This commit is contained in:
parent
62c9e5b08f
commit
5ba7f99326
@ -33,6 +33,10 @@ import java.net.URI
|
|||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
abstract class CCTweakedExtension(private val project: Project) {
|
abstract class CCTweakedExtension(private val project: Project) {
|
||||||
|
/** Get the hash of the latest git commit. */
|
||||||
|
val gitHash: Provider<String> =
|
||||||
|
gitProvider("<no git commit>", listOf("rev-parse", "HEAD")) { it.trim() }
|
||||||
|
|
||||||
/** Get the current git branch. */
|
/** Get the current git branch. */
|
||||||
val gitBranch: Provider<String> =
|
val gitBranch: Provider<String> =
|
||||||
gitProvider("<no git branch>", listOf("rev-parse", "--abbrev-ref", "HEAD")) { it.trim() }
|
gitProvider("<no git branch>", listOf("rev-parse", "--abbrev-ref", "HEAD")) { it.trim() }
|
||||||
@ -164,6 +168,7 @@ abstract class CCTweakedExtension(private val project: Project) {
|
|||||||
jacoco.applyTo(this)
|
jacoco.applyTo(this)
|
||||||
|
|
||||||
extensions.configure(JacocoTaskExtension::class.java) {
|
extensions.configure(JacocoTaskExtension::class.java) {
|
||||||
|
includes = listOf("dan200.computercraft.*")
|
||||||
excludes = listOf(
|
excludes = listOf(
|
||||||
"dan200.computercraft.mixin.*", // Exclude mixins, as they're not executed at runtime.
|
"dan200.computercraft.mixin.*", // Exclude mixins, as they're not executed at runtime.
|
||||||
"dan200.computercraft.shared.Capabilities$*", // Exclude capability tokens, as Forge rewrites them.
|
"dan200.computercraft.shared.Capabilities$*", // Exclude capability tokens, as Forge rewrites them.
|
||||||
|
@ -40,6 +40,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
|
inputs.property("gitHash", cct.gitHash)
|
||||||
|
|
||||||
var props = mapOf("gitContributors" to cct.gitContributors.get().joinToString("\n"))
|
var props = mapOf("gitContributors" to cct.gitContributors.get().joinToString("\n"))
|
||||||
filesMatching("data/computercraft/lua/rom/help/credits.md") { expand(props) }
|
filesMatching("data/computercraft/lua/rom/help/credits.md") { expand(props) }
|
||||||
}
|
}
|
||||||
|
@ -220,6 +220,8 @@ loom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
|
inputs.property("modVersion", modVersion)
|
||||||
|
|
||||||
var props = mapOf("version" to modVersion)
|
var props = mapOf("version" to modVersion)
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") { expand(props) }
|
filesMatching("fabric.mod.json") { expand(props) }
|
||||||
|
@ -190,6 +190,9 @@ dependencies {
|
|||||||
// Compile tasks
|
// Compile tasks
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
|
inputs.property("modVersion", modVersion)
|
||||||
|
inputs.property("forgeVersion", libs.versions.forge)
|
||||||
|
|
||||||
var props = mapOf(
|
var props = mapOf(
|
||||||
"forgeVersion" to libs.versions.forge.get(),
|
"forgeVersion" to libs.versions.forge.get(),
|
||||||
"file" to mapOf("jarVersion" to modVersion),
|
"file" to mapOf("jarVersion" to modVersion),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user