Skip to content

Commit

Permalink
Correctly store the OC version in the config file (#114)
Browse files Browse the repository at this point in the history
* fix extraneous @Version@

* don't doublecopy

* spotless don't gradle
  • Loading branch information
bombcar authored Jan 8, 2024
1 parent a33c483 commit fbe4427
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import org.apache.tools.ant.filters.ReplaceTokens

tasks.withType(ScalaCompile) {
scalaCompileOptions.forkOptions.with {
memoryMaximumSize = '4g'
}
}
tasks.named("processResources", ProcessResources).configure {
filesMatching("application.conf") {
filter(ReplaceTokens, tokens: [version: project.version])
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ opencomputers {
# The version of OC this config was generated by. This is used to allow the
# mod to reset parts of the config when their meaning changed across
# versions, so that the user does not have to delete it.
version: "@VERSION@"
version: "@version@"

# Client side settings, presentation and performance related stuff.
client {
Expand Down

0 comments on commit fbe4427

Please sign in to comment.