mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-132257 idea 14 eap cannot compile project which is based on gradle
(cherry picked from commit fbacfb3)
This commit is contained in:
+10
-7
@@ -126,13 +126,16 @@ public class ExternalProjectDataService implements ProjectDataService<ExternalPr
|
||||
ExternalProject externalProject = myExternalRootProjects.get(Pair.create(systemId, projectRootDir));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Can not find data for project at: " + projectRootDir);
|
||||
LOG.debug("Existing imported projects paths: " + ContainerUtil.map(myExternalRootProjects.entrySet(),
|
||||
new Function<Map.Entry<Pair<ProjectSystemId, File>, ExternalProject>, Object>() {
|
||||
@Override
|
||||
public Object fun(Map.Entry<Pair<ProjectSystemId, File>, ExternalProject> entry) {
|
||||
return Pair.create(entry.getKey(), entry.getValue().getProjectDir());
|
||||
}
|
||||
}));
|
||||
LOG.debug("Existing imported projects paths: " + ContainerUtil.map(
|
||||
myExternalRootProjects.entrySet(),
|
||||
new Function<Map.Entry<Pair<ProjectSystemId, File>, ExternalProject>, Object>() {
|
||||
@Override
|
||||
public Object fun(Map.Entry<Pair<ProjectSystemId, File>, ExternalProject> entry) {
|
||||
//noinspection ConstantConditions
|
||||
if (!(entry.getValue() instanceof ExternalProject)) return null;
|
||||
return Pair.create(entry.getKey(), entry.getValue().getProjectDir());
|
||||
}
|
||||
}));
|
||||
}
|
||||
return externalProject;
|
||||
}
|
||||
|
||||
+6
-2
@@ -133,13 +133,13 @@ class ExternalProjectBuilderImpl implements ModelBuilderService {
|
||||
ExternalSourceDirectorySet resourcesDirectorySet = new DefaultExternalSourceDirectorySet()
|
||||
resourcesDirectorySet.name = sourceSet.resources.name
|
||||
resourcesDirectorySet.srcDirs = sourceSet.resources.srcDirs
|
||||
resourcesDirectorySet.outputDir = sourceSet.output.resourcesDir
|
||||
resourcesDirectorySet.outputDir = chooseNotNull(sourceSet.output.resourcesDir, sourceSet.output.classesDir, project.buildDir)
|
||||
resourcesDirectorySet.inheritedCompilerOutput = inheritOutputDirs
|
||||
|
||||
ExternalSourceDirectorySet javaDirectorySet = new DefaultExternalSourceDirectorySet()
|
||||
javaDirectorySet.name = sourceSet.allJava.name
|
||||
javaDirectorySet.srcDirs = sourceSet.allJava.srcDirs
|
||||
javaDirectorySet.outputDir = sourceSet.output.classesDir
|
||||
javaDirectorySet.outputDir = chooseNotNull(sourceSet.output.classesDir, project.buildDir);
|
||||
javaDirectorySet.inheritedCompilerOutput = inheritOutputDirs
|
||||
// javaDirectorySet.excludes = javaExcludes + sourceSet.java.excludes;
|
||||
// javaDirectorySet.includes = javaIncludes + sourceSet.java.includes;
|
||||
@@ -173,6 +173,10 @@ class ExternalProjectBuilderImpl implements ModelBuilderService {
|
||||
result
|
||||
}
|
||||
|
||||
static <T> T chooseNotNull(T ... params) {
|
||||
params.findResult("", { it })
|
||||
}
|
||||
|
||||
static getFilters(Project project, String taskName) {
|
||||
def includes = []
|
||||
def excludes = []
|
||||
|
||||
Reference in New Issue
Block a user