diff --git a/addon.gradle b/addon.gradle index 507a2ca06d..5a991e12a1 100644 --- a/addon.gradle +++ b/addon.gradle @@ -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]) + } + } +} diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 844669cf50..190e0a5596 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -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 {