build: rerun addon resource processing when versions change

This commit is contained in:
Zoe Gidiere committed 2026-11-09 16:34:50 -07:00
1 parent 2f36b2d5c4
commit 44408a1b72
1 file changed
+11 -7
+11 -7
View File
@@ -41,22 +41,26 @@ fun Project.configureCompilation() {
}
}
// Gradle doesn't fingerprint filter arguments; the tokens are declared as inputs.
val metadataTokens = mapOf(
"DESCRIPTION" to properties["terra.description"],
"WIKI" to properties["terra.wiki"],
"SOURCE" to properties["terra.source"],
"ISSUES" to properties["terra.issues"],
"LICENSE" to properties["terra.license"]
)
tasks.withType<ProcessResources> {
include("**/*.*")
inputs.properties(metadataTokens.mapKeys { "token.${it.key}" }.mapValues { it.value.toString() })
filter<ReplaceTokens>(
"tokens" to mapOf(
"DESCRIPTION" to properties["terra.description"],
"WIKI" to properties["terra.wiki"],
"SOURCE" to properties["terra.source"],
"ISSUES" to properties["terra.issues"],
"LICENSE" to properties["terra.license"]
)
"tokens" to metadataTokens
)
}
afterEvaluate {
tasks.withType<ProcessResources> {
include("**/*.*")
inputs.property("token.VERSION", version.toString())
filter<ReplaceTokens>(
"tokens" to mapOf(
"VERSION" to version.toString()