Polyfrost / blossom

A Gradle plugin to perform source code token replacements in Java-based projects

Home Page:https://blossom.kyori.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

blossom Build Status License Gradle Plugin

blossom is a Gradle plugin for performing source code token replacements in Java, Kotlin, Scala, and Groovy based projects. It is licensed under the LGPL v2.1 license.

Usage

Apply the plugin to your project.

plugins {
  id("net.kyori.blossom") version "1.3.1"
}

Replacements can be configured through the BlossomExtension.

Global Replacement (all files)

Replacing all instances of the string APPLE (case-sensitive) with the string BANANA, in all files.

blossom {
  replaceToken("APPLE", "BANANA")
}

Local Replacement (per-file)

Replacing all instances of the string APPLE (case-sensitive) with the string BANANA in the specified file(s).

blossom {
  val constants = "src/main/java/org/example/application/Constants.java"
  replaceToken("APPLE", "BANANA", constants)
}

About

A Gradle plugin to perform source code token replacements in Java-based projects

https://blossom.kyori.net

License:GNU Lesser General Public License v2.1


Languages

Language:Java 100.0%