From c44ca47bfebdb9bb4ff946c3945bbaaf2715e54f Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 28 Sep 2019 09:43:33 +0100 Subject: [PATCH] Setup resource filtering Also mark gradlew as executable --- build.gradle.kts | 5 +++++ gradlew | 0 src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 gradlew diff --git a/build.gradle.kts b/build.gradle.kts index ba2a84ec9..37a4ff201 100644 --- a/build.gradle.kts +++ b/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("tokens" to mapOf("project.version" to project.version)) + } } java { diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 1f7efaea1..df6d276fa 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -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