Sfoglia il codice sorgente

Setup resource filtering

Also mark gradlew as executable
Shane Freeder 5 anni fa
parent
commit
c44ca47bfe
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  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