2
0
Эх сурвалжийг харах

Setup resource filtering

Also mark gradlew as executable
Shane Freeder 5 жил өмнө
parent
commit
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 {
     `java-library`
@@ -33,6 +34,10 @@ tasks {
         relocate("org.apache.tomcat", "com.gmail.nossr50.database.tomcat")
         relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
     }
+
+    processResources {
+        filter<ReplaceTokens>("tokens" to mapOf("project.version" to project.version))
+    }
 }
 
 java {

+ 1 - 1
gradlew

@@ -1,5 +1,5 @@
 name: mcMMO
-version: ${project.version}
+version: @project.version@
 description: >
     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