Skip to content

HexoMod-tools/gradle.replace.token.preprocessor.plugin

Repository files navigation

gradle-replace-token-preprocessor-plugin

License: MIT

A simple replace token preprocessor for java

How to use

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"

Usage

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
}

Examples

About

A simple java replace token preprocessor plugin

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
License.tpl

Stars

Watchers

Forks

Packages

No packages published

Languages