List<File> (CompileContext context, boolean tests) { List<File> resourceOutputs = new ArrayList<>(); JpsJavaDependenciesEnumerator enumerator = JpsJavaExtensionService.dependencies(myTarget.getModule()). includedIn(JpsJavaClasspathKind.compile(tests)). recursively(); for (JpsModule module : enumerator.getModules()) { resourceOutputs.addAll(new CheckResourcesTarget(module, CheckResourcesTarget.PRODUCTION).getOutputRoots(context)); if (tests) { resourceOutputs.addAll(new CheckResourcesTarget(module, CheckResourcesTarget.TESTS).getOutputRoots(context)); } } return resourceOutputs; }