A simple replace token preprocessor for java
The preprocessor is published in Gradle central.
Using the plugins DSL:
plugins {
  id "com.github.hexomod.replace.token.preprocessor" version "0.4"
}Using legacy plugin application:
buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.github.hexomod:ReplaceTokenPreprocessor:0.4"
  }
}
apply plugin: "com.github.hexomod.replace.token.preprocessor"ext {
    VERSION = "1.0.0"
    VERSION_NUM = "10000"
}
macroPreprocessorSettings {
    verbose = false     // default: false
    //extensions = [ ".properties",  ".yaml",  ".yml" ]
    //extension = ".java"
    java {
        enable = true   // default: true
    }
    resources {
        enable = true   // default: true
    }
    replace '@VERSION@': project.ext.VERSION
    replace '@VERSION_NUM@': project.ext.VERSION_NUM
}