mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-11-27 16:35:31 +00:00
build: rerun addon resource processing when versions change
This commit is contained in:
1 parent
2f36b2d5c4
commit
44408a1b72
1 file changed
+11
-7
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user