Provides the capability to compile JasperReports design files. This plugin is designed to work like the Maven plugins Maven 2 JasperReports Plugin and JasperReports-plugin. Much of this was inspired by these two projects.
Usage
This plugin provides one main task, compileAllReports. It uses incremental task feature to process out-of-date files and parallel collections from GPars for parallel processing. Adapt your build process to your own needs by defining the proper tasks depedencies (see Custom Build Process below).
If your designs compilation needs to run after Groovy compilation, running compileAllReports should give a similar output:
$ gradle compileAllReports
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:prepareReportsCompilation
:compileAllReports
21 designs compiled in 2222 ms
BUILD SUCCESSFUL
Total time: 6.577 secs
To clean up and start fresh, simply run:
$ gradle clean compileAllReports
Installation
Using the pluging DSL...
plugins {
id "com.github.gmazelier.jasperreports" version "0.4"
}
Adding a task dependency is very simple. For example, if you want to make sure that Groovy (and Java) compilation is successfully performed before JasperReports designs compilation, just add the following to your build script:
compileAllReports.dependsOn compileGroovy
Custom Classpath
Sharing dependencies
Here's a way to share dependencies (joda-time in this example) between the main project and the designs compilation:
请发表评论