SysGears team is glad to announce the first release of Grain Gradle Plugin. The plugin allows to manage Grain themes by using a set of predefined Gradle tasks, and makes it much easier to integrate any Grain website with existing Gradle projects, for instance, to create a project documentation.
To use the plugin, simply add the following to your build.gradle file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Then put your Grain site sources to the directory specified in
grain.projectDir property (to start with, you can
use one of the Grain themes).
Below is the list of Grain tasks to be added by plugin to your project:
gradle grainPreview- launches website in a preview mode
gradle grainGenerate- generates the website files to the destination directory (see filesystem)
gradle grainDeploy- deploys the resulting files (see deployment configuration)
gradle grainClean- cleans the site destination and target directories
Besides that, you can run your own Grain commands from the build script. For example, if you have
compress command to gzip site files before deploying, you can simply execute it by creating task of type
1 2 3 4 5