Drop module "ktm" scripts and support java source roots in "xml" modules
Drop kotlin.modules package from runtime Move adapted classes into compiler Unsupport files with "ktm" extension Delete code for loading module scripts Drop tests for module scripts Separate section for java source roots in xml script generator/parser
This commit is contained in:
@@ -67,23 +67,19 @@ public class KotlinModuleXmlBuilder {
|
||||
p.println("<", SOURCES, " ", PATH, "=\"", getEscapedPath(sourceFile), "\"/>");
|
||||
}
|
||||
|
||||
if (!javaSourceRoots.isEmpty()) {
|
||||
processClassPathSection("Java source roots", javaSourceRoots, directoriesToFilterOut);
|
||||
}
|
||||
|
||||
processClassPathSection("Classpath", classpathRoots, directoriesToFilterOut);
|
||||
processJavaSourceRoots(javaSourceRoots);
|
||||
processClasspath(classpathRoots, directoriesToFilterOut);
|
||||
processAnnotationRoots(annotationRoots);
|
||||
|
||||
closeTag(p, MODULE);
|
||||
return this;
|
||||
}
|
||||
|
||||
private void processClassPathSection(
|
||||
@NotNull String sectionDescription,
|
||||
private void processClasspath(
|
||||
@NotNull Collection<File> files,
|
||||
@NotNull Set<File> directoriesToFilterOut
|
||||
) {
|
||||
p.println("<!-- ", sectionDescription, " -->");
|
||||
p.println("<!-- Classpath -->");
|
||||
for (File file : files) {
|
||||
boolean isOutput = directoriesToFilterOut.contains(file) && !IncrementalCompilation.ENABLED;
|
||||
if (isOutput) {
|
||||
@@ -111,6 +107,13 @@ public class KotlinModuleXmlBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
private void processJavaSourceRoots(@NotNull List<File> files) {
|
||||
p.println("<!-- Java source roots -->");
|
||||
for (File file : files) {
|
||||
p.println("<", JAVA_SOURCE_ROOTS, " ", PATH, "=\"", getEscapedPath(file), "\"/>");
|
||||
}
|
||||
}
|
||||
|
||||
public CharSequence asText() {
|
||||
if (!done) {
|
||||
closeTag(p, MODULES);
|
||||
|
||||
Reference in New Issue
Block a user