Hi there,
to speed up our aspectj build I've changed the following task:
-------------------------
task compileJava(dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME,
overwrite: true) << {
ant.taskdef(
resource:"org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties",
classpath: configurations.ajc.asPath)
ant.iajc(source:sourceCompatibility, target:targetCompatibility,
destDir:sourceSets.main.classesDir.absolutePath, maxmem:"512m",
fork:"true",
aspectPath:configurations.aspects.asPath,
inpath:configurations.ajInpath.asPath,
sourceRootCopyFilter:"**/.svn/*,**/*.java",classpath:configurations.compile.asPath){
sourceroots{
sourceSets.main.java.srcDirs.each{
pathelement(location:it.absolutePath)
}
}
}
}
-------------------------
to the following code:
-------------------------
task compileJava(dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME,
overwrite: true) {
outputs.files sourceSets.main.classesDir
inputs.files sourceSets.main.java.srcDirs,
configurations.aspects.files, configurations.ajInpath.files,
configurations.compile
inputs.properties(["sourceCompatibility":sourceCompatibility,
"targetCompatibility":targetCompatibility])
}
compileJava.doLast{
ant.taskdef(
resource:"org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties",
classpath: configurations.ajc.asPath)
ant.iajc(source:sourceCompatibility, target:targetCompatibility,
destDir:sourceSets.main.classesDir.absolutePath, maxmem:"512m",
fork:"true",
aspectPath:configurations.aspects.asPath,
inpath:configurations.ajInpath.asPath,
sourceRootCopyFilter:"**/.svn/*,**/*.java",classpath:configurations.compile.asPath){
sourceroots{
sourceSets.main.java.srcDirs.each{
pathelement(location:it.absolutePath)
}
}
}
}
-------------------------
What I don't like about this change, is that I have to split the task
into configuration and doLast setup. Is there a more convenient way to
do this?
regards,
René
--
------------------------------------
Rene Groeschke
[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email