Skip to content

Commit

Permalink
fix extraneous @Version@
Browse files Browse the repository at this point in the history
  • Loading branch information
bombcar committed Jan 8, 2024
1 parent a33c483 commit 9bb93fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import org.apache.tools.ant.filters.ReplaceTokens

tasks.withType(ScalaCompile) {
scalaCompileOptions.forkOptions.with {
memoryMaximumSize = '4g'
}
}
tasks.named("processResources", ProcessResources).configure {
it.inputs.file('src/main/resources/application.conf')
it.inputs.property('version', project.version)
doLast {
copy {
from 'src/main/resources/application.conf'
into 'build/resources/main'
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 9bb93fa

Please sign in to comment.