mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
IDEA plugin: don't load dependencies transitively, since IDEA provides all necessary dependencies
This commit is contained in:
parent
dc99ead514
commit
544eb4e827
|
@ -99,7 +99,7 @@ class TeaVMBuild {
|
||||||
|
|
||||||
classPathEntries.clear();
|
classPathEntries.clear();
|
||||||
buildStrategy.init();
|
buildStrategy.init();
|
||||||
buildClassPath(module, new HashSet<>());
|
buildClassPath(module);
|
||||||
directoryClassPathEntries = classPathEntries.stream().filter(name -> new File(name).isDirectory())
|
directoryClassPathEntries = classPathEntries.stream().filter(name -> new File(name).isDirectory())
|
||||||
.collect(toList());
|
.collect(toList());
|
||||||
|
|
||||||
|
@ -471,10 +471,7 @@ class TeaVMBuild {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildClassPath(JpsModule module, Set<JpsModule> visited) {
|
private void buildClassPath(JpsModule module) {
|
||||||
if (!visited.add(module)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
File output = JpsJavaExtensionService.getInstance().getOutputDirectory(module, false);
|
File output = JpsJavaExtensionService.getInstance().getOutputDirectory(module, false);
|
||||||
if (output != null) {
|
if (output != null) {
|
||||||
classPathEntries.add(output.getPath());
|
classPathEntries.add(output.getPath());
|
||||||
|
@ -487,7 +484,11 @@ class TeaVMBuild {
|
||||||
for (JpsDependencyElement dependency : module.getDependenciesList().getDependencies()) {
|
for (JpsDependencyElement dependency : module.getDependenciesList().getDependencies()) {
|
||||||
if (dependency instanceof JpsModuleDependency) {
|
if (dependency instanceof JpsModuleDependency) {
|
||||||
JpsModuleDependency moduleDependency = (JpsModuleDependency) dependency;
|
JpsModuleDependency moduleDependency = (JpsModuleDependency) dependency;
|
||||||
buildClassPath(moduleDependency.getModule(), visited);
|
File dependencyOutput = JpsJavaExtensionService.getInstance().getOutputDirectory(
|
||||||
|
moduleDependency.getModule(), false);
|
||||||
|
if (dependencyOutput != null) {
|
||||||
|
classPathEntries.add(dependencyOutput.getPath());
|
||||||
|
}
|
||||||
} else if (dependency instanceof JpsLibraryDependency) {
|
} else if (dependency instanceof JpsLibraryDependency) {
|
||||||
JpsLibrary library = ((JpsLibraryDependency) dependency).getLibrary();
|
JpsLibrary library = ((JpsLibraryDependency) dependency).getLibrary();
|
||||||
if (library == null) {
|
if (library == null) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user