|
@@ -12,7 +12,7 @@ configure(javaProjects) {
|
|
testOutputDir = "$rootProject.projectDir/intellij/testOut" as File
|
|
testOutputDir = "$rootProject.projectDir/intellij/testOut" as File
|
|
whenConfigured { module ->
|
|
whenConfigured { module ->
|
|
def allClasses = module.dependencies.findAll() { dep ->
|
|
def allClasses = module.dependencies.findAll() { dep ->
|
|
- if (dep instanceof org.gradle.plugins.idea.model.ModuleLibrary
|
|
|
|
|
|
+ if (dep instanceof org.gradle.plugins.ide.idea.model.ModuleLibrary
|
|
&& dep.classes.find { path ->
|
|
&& dep.classes.find { path ->
|
|
path.url.matches('.*jcl-over-slf4j.*') ||
|
|
path.url.matches('.*jcl-over-slf4j.*') ||
|
|
path.url.matches('.*servlet-api.*') ||
|
|
path.url.matches('.*servlet-api.*') ||
|
|
@@ -32,7 +32,7 @@ configure(javaProjects) {
|
|
eclipseClasspath.whenConfigured { classpath ->
|
|
eclipseClasspath.whenConfigured { classpath ->
|
|
def includeDeps = project.configurations.getByName('runtime')?.collect { f-> f.absolutePath } as Set
|
|
def includeDeps = project.configurations.getByName('runtime')?.collect { f-> f.absolutePath } as Set
|
|
classpath.entries.each { cp ->
|
|
classpath.entries.each { cp ->
|
|
- if(cp instanceof org.gradle.plugins.eclipse.model.Library) {
|
|
|
|
|
|
+ if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) {
|
|
def include = includeDeps.contains(cp.path)
|
|
def include = includeDeps.contains(cp.path)
|
|
def attr = 'org.eclipse.jst.component.dependency'
|
|
def attr = 'org.eclipse.jst.component.dependency'
|
|
if(include && project.hasProperty('war')) {
|
|
if(include && project.hasProperty('war')) {
|
|
@@ -49,14 +49,14 @@ configure(javaProjects) {
|
|
// GRADLE-1426 (part b)
|
|
// GRADLE-1426 (part b)
|
|
project.plugins.withType(org.gradle.api.plugins.WarPlugin.class).all {
|
|
project.plugins.withType(org.gradle.api.plugins.WarPlugin.class).all {
|
|
eclipseWtpComponent.whenConfigured { wtpComp ->
|
|
eclipseWtpComponent.whenConfigured { wtpComp ->
|
|
- wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.eclipse.model.WbDependentModule }.each { e ->
|
|
|
|
|
|
+ wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.WbDependentModule }.each { e ->
|
|
if(!e.handle.startsWith('module:/resource/')) {
|
|
if(!e.handle.startsWith('module:/resource/')) {
|
|
wtpComp.wbModuleEntries.remove(e)
|
|
wtpComp.wbModuleEntries.remove(e)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- tasks.withType(org.gradle.plugins.eclipse.EclipseWtpComponent) {
|
|
|
|
|
|
+ tasks.withType(org.gradle.plugins.ide.eclipse.GenerateEclipseWtpComponent) {
|
|
whenConfigured { wtpComponent ->
|
|
whenConfigured { wtpComponent ->
|
|
wtpComponent.contextPath = project.tasks.findByName('jettyRun')?.contextPath?.replaceFirst('/','')
|
|
wtpComponent.contextPath = project.tasks.findByName('jettyRun')?.contextPath?.replaceFirst('/','')
|
|
}
|
|
}
|