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.
This commit is contained in:
Rob Winch 2013-08-05 10:37:37 -05:00
parent fdb73fac23
commit 51a48fa9fa
1 changed files with 19 additions and 0 deletions

View File

@ -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 << """<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
"""
}
}
}
configure(subprojects - coreModuleProjects) {
tasks.findByPath("artifactoryPublish")?.enabled = false
sonarRunner {