summaryrefslogtreecommitdiff
path: root/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy')
-rw-r--r--plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy21
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy
index 00f4c8bb0b6e..2eb7137949e2 100644
--- a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy
+++ b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy
@@ -88,20 +88,25 @@ class WarModelBuilderImpl implements ModelBuilderService {
if (resolver.metaClass.respondsTo(resolver, 'getSourcePaths')) {
sourcePaths = resolver.getSourcePaths()
- } else if (resolver.this$0.metaClass.respondsTo(resolver, 'getSourcePaths')) {
+ } else if (resolver.hasProperty('sourcePaths')) {
+ sourcePaths = resolver.sourcePaths
+ } else if (resolver.hasProperty('this$0') && resolver.this$0.metaClass.respondsTo(resolver, 'getSourcePaths')) {
sourcePaths = resolver.this$0.getSourcePaths()
- } else {
+ } else if (resolver.hasProperty('this$0') && resolver.this$0.hasProperty('sourcePaths')) {
+ sourcePaths = resolver.this$0.sourcePaths
+ } /*else {
throw new RuntimeException("${GradleVersion.current()} is not supported by web artifact importer")
- }
+ }*/
- (sourcePaths.flatten() as List).each { def path ->
- if (path instanceof String) {
- def file = new File(warTask.project.projectDir, path)
- addPath(webResources, relativePath, "", file)
+ if(sourcePaths) {
+ (sourcePaths.flatten() as List).each { def path ->
+ if (path instanceof String) {
+ def file = new File(warTask.project.projectDir, path)
+ addPath(webResources, relativePath, "", file)
+ }
}
}
-
resolver.source.visit(new FileVisitor() {
@Override
public void visitDir(FileVisitDetails dirDetails) {