From ace6b804f7a798e73bead18b9c553973a8a09e52 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 1 Nov 2012 16:12:41 -0500 Subject: [PATCH] Update to 3.2.x and added eclipse suffix to eclipse projects --- .../src/main/groovy/aspectj/AspectJPlugin.groovy | 10 ++++++++-- gradle.properties | 2 +- gradle/ide-integration.gradle | 12 +++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy b/buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy index 81fc7c2518..33f2c8b821 100644 --- a/buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy +++ b/buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy @@ -11,6 +11,7 @@ import org.gradle.api.GradleException import org.gradle.plugins.ide.eclipse.GenerateEclipseProject import org.gradle.plugins.ide.eclipse.GenerateEclipseClasspath +import org.gradle.plugins.ide.eclipse.EclipsePlugin import org.gradle.plugins.ide.eclipse.model.BuildCommand import org.gradle.plugins.ide.eclipse.model.ProjectDependency @@ -63,8 +64,13 @@ class AspectJPlugin implements Plugin { project.tasks.withType(GenerateEclipseClasspath) { project.eclipse.classpath.file.whenMerged { classpath -> def entries = classpath.entries.findAll { it instanceof ProjectDependency}.findAll { entry -> - def projectPath = entry.path.replaceAll('/',':') - project.rootProject.findProject(projectPath).plugins.findPlugin(AspectJPlugin) + def projectPath = entry.path.replaceAll('/','') + project.rootProject.allprojects.find{ p-> + if(p.plugins.findPlugin(EclipsePlugin)) { + return p.eclipse.project.name == projectPath && p.plugins.findPlugin(AspectJPlugin) + } + false + } } entries.each { entry-> entry.entryAttributes.put('org.eclipse.ajdt.aspectpath','org.eclipse.ajdt.aspectpath') diff --git a/gradle.properties b/gradle.properties index 2a04e0256d..abe86ba297 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=3.1.4.CI-SNAPSHOT +version=3.2.0.CI-SNAPSHOT diff --git a/gradle/ide-integration.gradle b/gradle/ide-integration.gradle index bbf6652b64..141608f76b 100644 --- a/gradle/ide-integration.gradle +++ b/gradle/ide-integration.gradle @@ -1,10 +1,12 @@ -apply plugin: 'idea' - -configure(javaProjects) { +configure(allprojects) { apply plugin: 'idea' apply plugin: 'eclipse-wtp' - eclipse.classpath.downloadSources = true + eclipse.project.name = "${project.name}-3.2.x" +} + +configure(javaProjects) { + eclipse.classpath.downloadSources = true // GRADLE-1116 project.eclipse.classpath.file.whenMerged { classpath -> @@ -49,7 +51,7 @@ project(':spring-security-samples-aspectj') { doLast { def classpath = new XmlParser().parse(srcFile) - classpath.classpathentry.findAll{ it.@path == '/spring-security-aspects' }.each { node -> + classpath.classpathentry.findAll{ it.@path.startsWith('/spring-security-aspects') }.each { node -> if(node.children().size() == 0) { def attrs = new Node(node,'attributes') def adjtAttr = new Node(attrs,'attributes',[name: 'org.eclipse.ajdt.aspectpath', value: 'org.eclipse.ajdt.aspectpath'])