Hi
Anybody tried defining custom ant task in gradle for compiling jasper
template into .jasper file. I tried the following but has not been
successful.
repositories {
mavenCentral()
}
configurations {
jasperreports
}
dependencies {
jasperreports 'net.sf.jasperreports:jasperreports:3.7.0',
'commons-digester:commons-digester:2.0',
'org.codehaus.groovy:groovy-all:1.7.4'
}
ant.taskdef(name:'jrc',
classname:'net.sf.jasperreports.ant.JRAntCompileTask',
classpath:project.configurations.jasperreports.asPath
)
task compileJasper << {
ant.mkdir(dir:'jrxml')
ant.mkdir(dir:'jasper')
ant.copy(todir:'jrxml') {
ant.fileset(dir:'resources/templates') {
include(name:'**/*.jrxml')
}
}
ant.jrc(srcdir:'jrxml', destdir:'jasper',
compiler:'net.sf.jasperreports.compilers.JRGroovyCompiler')
}
Been getting thrown exception from gradle on not able to resolve
jasperreport classes. But when I copied the dependencies into
{GRADLE_HOME}\lib folder, the task execute properly. Any ideas anybody?
Thanks
Soon Dee