From 51a48fa9faf983e170b873661b63a10eff086622 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 5 Aug 2013 10:37:37 -0500 Subject: [PATCH] Allow import without Eclipse dependency management This adds a .classpath file that contains no source folders to ensure that the projects that are not java projects work. The projects still require a java project nature to add the gradle project nature. --- build.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.gradle b/build.gradle index 4091b0fa66..9b919824e0 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,25 @@ ext.itestProjects = subprojects.findAll { project -> project.name.startsWith('it ext.coreModuleProjects = javaProjects - sampleProjects - itestProjects ext.aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-aspectj-xml')] +configure(allprojects - javaProjects) { + task afterEclipseImport { + ext.srcFile = file('.classpath') + inputs.file srcFile + outputs.dir srcFile + + onlyIf { !srcFile.exists() } + + doLast { + srcFile << """ + + + + +""" + } + } +} + configure(subprojects - coreModuleProjects) { tasks.findByPath("artifactoryPublish")?.enabled = false sonarRunner {