fix access from tests to internal elements in production code in case of circular dependency
This commit is contained in:
@@ -28,6 +28,7 @@ public class ModuleBuilder(
|
||||
private val sourceFiles = ArrayList<String>()
|
||||
private val classpathRoots = ArrayList<String>()
|
||||
private val javaSourceRoots = ArrayList<JavaRootPath>()
|
||||
private val friendDirs = ArrayList<String>()
|
||||
|
||||
public fun addSourceFiles(pattern: String) {
|
||||
sourceFiles.add(pattern)
|
||||
@@ -41,7 +42,12 @@ public class ModuleBuilder(
|
||||
javaSourceRoots.add(rootPath)
|
||||
}
|
||||
|
||||
public fun addFriendDir(friendDir: String) {
|
||||
friendDirs.add(friendDir)
|
||||
}
|
||||
|
||||
override fun getOutputDirectory(): String = outputDir
|
||||
override fun getFriendPaths(): List<String> = friendDirs
|
||||
override fun getJavaSourceRoots(): List<JavaRootPath> = javaSourceRoots
|
||||
override fun getSourceFiles(): List<String> = sourceFiles
|
||||
override fun getClasspathRoots(): List<String> = classpathRoots
|
||||
|
||||
+5
@@ -47,6 +47,7 @@ public class ModuleXmlParser {
|
||||
public static final String TYPE_PRODUCTION = "java-production";
|
||||
public static final String TYPE_TEST = "java-test";
|
||||
public static final String OUTPUT_DIR = "outputDir";
|
||||
public static final String FRIEND_DIR = "friendDir";
|
||||
public static final String SOURCES = "sources";
|
||||
public static final String JAVA_SOURCE_ROOTS = "javaSourceRoots";
|
||||
public static final String JAVA_SOURCE_PACKAGE_PREFIX = "packagePrefix";
|
||||
@@ -162,6 +163,10 @@ public class ModuleXmlParser {
|
||||
String path = getAttribute(attributes, PATH, qName);
|
||||
moduleBuilder.addSourceFiles(path);
|
||||
}
|
||||
else if (FRIEND_DIR.equalsIgnoreCase(qName)) {
|
||||
String path = getAttribute(attributes, PATH, qName);
|
||||
moduleBuilder.addFriendDir(path);
|
||||
}
|
||||
else if (CLASSPATH.equalsIgnoreCase(qName)) {
|
||||
String path = getAttribute(attributes, PATH, qName);
|
||||
moduleBuilder.addClasspathEntry(path);
|
||||
|
||||
Reference in New Issue
Block a user