Skip to content
klu2 edited this page Dec 5, 2012 · 3 revisions

This plugin can be used to create the build file 'Build.java' into '/target/generated-sources/main/' + package path.

The created file has the following content:

package $packageName;

public class Build {
	public static final String VERSION = $version;
	public static final String DATE = $date;
}

The variables will get following content:

$packageName
    configurable with plugin property (as seen in the example below)
$version
    contains the project version
$date
    current time when plugin is executed, format: "dd.MM.yyyy HH:mm" (e.g. "05.01.2012 10:47")

This is an example configuration:

apply plugin: 'cat-codegen-java'
codegenjava {
	build { 
		packageName 'cc.catalysts.shared' 
	}
}
Clone this wiki locally