Hi Jira (or Jirka?)
I extract my aspectj configuration to a 'script-plugin' at http://github.com/breskeby/gradleplugins/blob/0.9-upgrade/aspectjPlugin/aspectJ.gradle
This plugin extends java plugin.

regards,
René

Jira schrieb:
Because I can't realize nowhere how to integrate with aspectj here comes my
configuration:

the aspect sources are in src/main/aspectj and str/test/aspectj directories.

task compileAspectj(dependsOn: compileJava) << {
   def classesDir = compileJava.destinationDir
   doAspectjCompile(files(classesDir) + configurations.compile,
file('src/main/aspectj'), classesDir, classesDir) }
classes.dependsOn compileAspectj

task compileTestAspectj(dependsOn: compileTestJava) << {
   def classesDir = compileTestJava.destinationDir
   doAspectjCompile(files(compileJava.destinationDir, classesDir) +
configurations.testCompile, file('src/test/aspectj'), classesDir,
classesDir) }
testClasses.dependsOn compileTestAspectj

def doAspectjCompile(aspectjClasspath, aspectjSrc, aspectjInput,
aspectjOutput) {
   ant {
      taskdef(resource:
'org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties', classpath:
configurations.aspectj.asPath)
      iajc(sourceroots: aspectjSrc, inpath: aspectjInput, destdir:
aspectjOutput, encoding: 'UTF-8', debug: 'on', source: '1.6', showWeaveInfo:
'true', classpath: aspectjClasspath.asPath)
   }
}

Jirka



--
------------------------------------
Rene Groeschke

[email protected]
http://www.breskeby.com
------------------------------------


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to