mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gradle] revert workaround for IDEA-198766 IDEA-CR-48979
Signed-off-by: Nikita Skvortsov <nikita.skvortsov@jetbrains.com> GitOrigin-RevId: 51990f34931b80ff49a8603d64f23bf97787b15e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
58cdca5859
commit
c31af0b19d
+4
-17
@@ -60,12 +60,6 @@ class WarModelBuilderImpl implements ModelBuilderService {
|
||||
|
||||
def warModels = []
|
||||
|
||||
Set<File> excludeDirs = new HashSet<File>()
|
||||
def configuredExcludes = project.hasProperty("idea") ? project.idea?.module?.excludeDirs : null
|
||||
if (configuredExcludes != null) {
|
||||
excludeDirs.addAll((Collection)configuredExcludes)
|
||||
}
|
||||
|
||||
project.tasks.each { Task task ->
|
||||
if (task instanceof War) {
|
||||
final WarModelImpl warModel =
|
||||
@@ -79,19 +73,19 @@ class WarModelBuilderImpl implements ModelBuilderService {
|
||||
@Override
|
||||
void visitSourcePath(String relativePath, String path) {
|
||||
def file = new File(path)
|
||||
addPath(excludeDirs, webResources, relativePath, "", file.absolute ? file : new File(warTask.project.projectDir, path))
|
||||
addPath(webResources, relativePath, "", file.absolute ? file : new File(warTask.project.projectDir, path))
|
||||
}
|
||||
|
||||
@Override
|
||||
void visitDir(String relativePath, FileVisitDetails dirDetails) {
|
||||
addPath(excludeDirs, webResources, relativePath, dirDetails.path, dirDetails.file)
|
||||
addPath(webResources, relativePath, dirDetails.path, dirDetails.file)
|
||||
}
|
||||
|
||||
@Override
|
||||
void visitFile(String relativePath, FileVisitDetails fileDetails) {
|
||||
if (warTask.webXml == null ||
|
||||
!fileDetails.file.canonicalPath.equals(warTask.webXml.canonicalPath)) {
|
||||
addPath(Collections.emptySet(), webResources, relativePath, fileDetails.path, fileDetails.file)
|
||||
addPath(webResources, relativePath, fileDetails.path, fileDetails.file)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -134,14 +128,7 @@ class WarModelBuilderImpl implements ModelBuilderService {
|
||||
).withDescription("Web Facets/Artifacts will not be configured properly")
|
||||
}
|
||||
|
||||
private static addPath(Set<File> excludeList,
|
||||
List<WebConfiguration.WebResource> webResources,
|
||||
String warRelativePath,
|
||||
String fileRelativePath,
|
||||
File file) {
|
||||
if (excludeList.contains(file)) {
|
||||
return
|
||||
}
|
||||
private static addPath(List<WebConfiguration.WebResource> webResources, String warRelativePath, String fileRelativePath, File file) {
|
||||
warRelativePath = warRelativePath == null ? "" : warRelativePath
|
||||
|
||||
WebConfiguration.WebResource webResource = new WebResourceImpl(warRelativePath, fileRelativePath, file)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//noinspection GrPackage
|
||||
|
||||
apply plugin: 'war'
|
||||
apply plugin: 'idea'
|
||||
|
||||
configurations {
|
||||
moreLibs
|
||||
@@ -29,7 +28,6 @@ configurations {
|
||||
// runtime files('extras')
|
||||
//}
|
||||
|
||||
idea.module.excludeDirs += files('build/generated_content')
|
||||
|
||||
war {
|
||||
from('src/rootContent') {
|
||||
@@ -41,6 +39,4 @@ war {
|
||||
classpath configurations.moreLibs // adds a configuration to the WEB-INF/lib dir.
|
||||
webXml = file('src/someWeb.xml') // copies a file to WEB-INF/web.xml
|
||||
classpath file('src/bbb')
|
||||
|
||||
from ('build/generated_content') // to be excluded from idea project by idea.module.excludeDirs
|
||||
}
|
||||
Reference in New Issue
Block a user