浏览代码

Setup resource filtering

Also mark gradlew as executable
Shane Freeder 6 年之前
父节点
当前提交
c44ca47bfe
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 0
      build.gradle.kts
  2. 1 1
      gradlew

+ 5 - 0
build.gradle.kts

@@ -1,3 +1,4 @@
+import org.apache.tools.ant.filters.ReplaceTokens
 
 
 plugins {
 plugins {
     `java-library`
     `java-library`
@@ -33,6 +34,10 @@ tasks {
         relocate("org.apache.tomcat", "com.gmail.nossr50.database.tomcat")
         relocate("org.apache.tomcat", "com.gmail.nossr50.database.tomcat")
         relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
         relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
     }
     }
+
+    processResources {
+        filter<ReplaceTokens>("tokens" to mapOf("project.version" to project.version))
+    }
 }
 }
 
 
 java {
 java {

+ 1 - 1
gradlew

@@ -1,5 +1,5 @@
 name: mcMMO
 name: mcMMO
-version: ${project.version}
+version: @project.version@
 description: >
 description: >
     The goal of mcMMO is to take core Minecraft game mechanics and expand them into
     The goal of mcMMO is to take core Minecraft game mechanics and expand them into
     add an extensive and quality RPG experience. Everything in mcMMO has been carefully
     add an extensive and quality RPG experience. Everything in mcMMO has been carefully