mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ public abstract class ArtifactBuilderTestCase extends UsefulTestCase {
|
||||
final Module module = myProject.createModule(moduleName, Closure.IDENTITY);
|
||||
module.forceInit();
|
||||
module.setSdk(myJdk);
|
||||
module.getDependencies().add(new Module.ModuleDependency(myJdk, PredefinedDependencyScopes.getCOMPILE(), false));
|
||||
module.addDependency(myJdk, PredefinedDependencyScopes.getCOMPILE(), false);
|
||||
if (srcPath != null) {
|
||||
module.getContentRoots().add(srcPath);
|
||||
module.getSourceRoots().add(srcPath);
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.jetbrains.jps
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.jps.idea.Facet
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
|
||||
/**
|
||||
* @author max
|
||||
@@ -11,7 +12,7 @@ class Module extends LazyInitializeableObject implements ClasspathItem {//}, Com
|
||||
String name;
|
||||
Sdk sdk;
|
||||
|
||||
List<ModuleDependency> dependencies = []
|
||||
private List<ModuleDependency> dependencies = []
|
||||
List<String> contentRoots = []
|
||||
List<String> sourceRoots = []
|
||||
List<String> testRoots = []
|
||||
@@ -115,7 +116,12 @@ class Module extends LazyInitializeableObject implements ClasspathItem {//}, Com
|
||||
return dependencies.findAll({it.scope.isIncludedIn(kind) && (!exportedOnly || it.exported)})*.item;
|
||||
}
|
||||
|
||||
public static class ModuleDependency {
|
||||
@TestOnly
|
||||
public void addDependency(ClasspathItem dependency, DependencyScope scope, boolean exported) {
|
||||
dependencies << new ModuleDependency(dependency, scope, exported)
|
||||
}
|
||||
|
||||
private static class ModuleDependency {
|
||||
ClasspathItem item
|
||||
DependencyScope scope
|
||||
boolean exported
|
||||
|
||||
Reference in New Issue
Block a user