Updated gradle build so that eclipse is configured for AJDT

This commit is contained in:
Rob Winch 2011-03-06 12:53:46 -06:00
parent 8978a3af3d
commit bd53ff1832
1 changed files with 14 additions and 0 deletions

View File

@ -50,3 +50,17 @@ class Ajc extends DefaultTask {
}
}
}
if(hasProperty('eclipseProject')) {
eclipseProject.whenConfigured { project ->
project.natures.add(0, 'org.eclipse.ajdt.ui.ajnature')
project.buildCommands = [new org.gradle.plugins.eclipse.model.BuildCommand('org.eclipse.ajdt.core.ajbuilder',[:])]
}
}
if(hasProperty('eclipseClasspath')) {
eclipseClasspath.withXml { xml ->
def ssa = xml.asNode().'classpathentry'.find { it.@path == '/spring-security-aspects' }
ssa?.appendNode('attributes')?.appendNode('attribute',[name:'org.eclipse.ajdt.aspectpath',value:'org.eclipse.ajdt.aspectpath'])
}
}