Skip to content

Commit e20b56e

Browse files
committed
Fix processResources cache
1 parent b9ad816 commit e20b56e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

bukkit/build.gradle.kts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.apache.tools.ant.filters.ReplaceTokens
2+
import org.codehaus.groovy.tools.shell.util.Preferences.keys
23

34
plugins {
45
kotlin("jvm") version "1.9.22"
@@ -40,13 +41,14 @@ tasks {
4041
}
4142

4243
processResources {
43-
filter<ReplaceTokens>(
44-
"tokens" to mapOf(
45-
"versionName" to project.property("versionName"),
46-
"versionChannel" to project.property("versionChannel"),
47-
"versionId" to project.property("versionId"),
48-
))
49-
outputs.doNotCacheIf("MakeReplacementsWork") { true }
44+
val tokens = "tokens" to mapOf(
45+
"versionName" to project.property("versionName"),
46+
"versionChannel" to project.property("versionChannel"),
47+
"versionId" to project.property("versionId"),
48+
)
49+
filter<ReplaceTokens>(tokens)
50+
val properties = rootProject.ext.properties.filter { tokens.second.contains(it.key) }
51+
inputs.properties(properties)
5052
}
5153
}
5254

0 commit comments

Comments
 (0)