SEC-2097: Remove configure() blocks from gradle/*.gradle
This commit is contained in:
parent
e0cb931f69
commit
54bf6c846b
|
@ -21,6 +21,9 @@ apply plugin: 'base'
|
||||||
description = 'Spring Security'
|
description = 'Spring Security'
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
apply plugin: 'idea'
|
||||||
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
ext.releaseBuild = version.endsWith('RELEASE')
|
ext.releaseBuild = version.endsWith('RELEASE')
|
||||||
ext.snapshotBuild = version.endsWith('SNAPSHOT')
|
ext.snapshotBuild = version.endsWith('SNAPSHOT')
|
||||||
|
|
||||||
|
@ -30,6 +33,8 @@ allprojects {
|
||||||
maven { url "http://repo.springsource.org/libs-release" }
|
maven { url "http://repo.springsource.org/libs-release" }
|
||||||
maven { url "http://repo.springsource.org/plugins-release" }
|
maven { url "http://repo.springsource.org/plugins-release" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eclipse.project.name = "${project.name}-3.2.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
sonarRunner {
|
sonarRunner {
|
||||||
|
@ -157,8 +162,6 @@ artifacts {
|
||||||
archives project(':docs').schemaZip
|
archives project(':docs').schemaZip
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/gradle/ide-integration.gradle"
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '1.6'
|
gradleVersion = '1.6'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
|
||||||
|
|
||||||
configure(allprojects) {
|
|
||||||
apply plugin: 'idea'
|
|
||||||
apply plugin: 'eclipse'
|
|
||||||
|
|
||||||
eclipse.project.name = "${project.name}-3.2.x"
|
|
||||||
}
|
|
||||||
|
|
||||||
configure(javaProjects) {
|
|
||||||
eclipse.classpath.downloadSources = true
|
|
||||||
|
|
||||||
// http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided
|
|
||||||
eclipse.classpath {
|
|
||||||
defaultOutputDir = file('bin/main')
|
|
||||||
file.whenMerged { cp ->
|
|
||||||
cp.entries.findAll { it instanceof SourceFolder && (it.path.contains("test") || it.path.contains("Test")) }*.output = "bin/test"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GRADLE-1422
|
|
||||||
project.eclipseClasspath.doFirst {
|
|
||||||
// delay adding whenMerged till the entryAttributes are added (must be the last whenMerged)
|
|
||||||
project.eclipse.classpath.file.whenMerged { classpath ->
|
|
||||||
def includeDeps = project.configurations.getByName('runtime').collect {f -> f.absolutePath } as Set
|
|
||||||
classpath.entries.each { cp ->
|
|
||||||
if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) {
|
|
||||||
def include = includeDeps.contains(cp.path)
|
|
||||||
def attr = 'org.eclipse.jst.component.dependency'
|
|
||||||
if(!include) {
|
|
||||||
cp.entryAttributes.remove(attr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'eclipse-wtp'
|
apply plugin: 'eclipse-wtp'
|
||||||
apply plugin: 'propdeps'
|
apply plugin: 'propdeps'
|
||||||
|
@ -154,6 +156,33 @@ javadoc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eclipse.classpath.downloadSources = true
|
||||||
|
|
||||||
|
// http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided
|
||||||
|
eclipse.classpath {
|
||||||
|
defaultOutputDir = file('bin/main')
|
||||||
|
file.whenMerged { cp ->
|
||||||
|
cp.entries.findAll { it instanceof SourceFolder && (it.path.contains("test") || it.path.contains("Test")) }*.output = "bin/test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GRADLE-1422
|
||||||
|
project.eclipseClasspath.doFirst {
|
||||||
|
// delay adding whenMerged till the entryAttributes are added (must be the last whenMerged)
|
||||||
|
project.eclipse.classpath.file.whenMerged { classpath ->
|
||||||
|
def includeDeps = project.configurations.getByName('runtime').collect {f -> f.absolutePath } as Set
|
||||||
|
classpath.entries.each { cp ->
|
||||||
|
if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) {
|
||||||
|
def include = includeDeps.contains(cp.path)
|
||||||
|
def attr = 'org.eclipse.jst.component.dependency'
|
||||||
|
if(!include) {
|
||||||
|
cp.entryAttributes.remove(attr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar) {
|
task javadocJar(type: Jar) {
|
||||||
classifier = 'javadoc'
|
classifier = 'javadoc'
|
||||||
from javadoc
|
from javadoc
|
||||||
|
|
Loading…
Reference in New Issue