Use reflection in Ant task to invoke compiler
This will allow a more controlled management of the runtime that the compiler is linked against. Incidentally this also allows Ant task to use any of compiler arguments via <compilerarg> because Ant task is now just a facade for the CLI compiler. The test "wrongArguments" is deleted because the full compiler usage is now printed out on a wrong <compilerarg>, and this will become inconvenient to update with each change in compiler arguments #KT-5618 Fixed
This commit is contained in:
@@ -58,6 +58,12 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
||||
return exec(errStream, services, MessageRenderer.TAGS, args);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration") // Used via reflection in KotlinCompilerBaseTask
|
||||
@NotNull
|
||||
public ExitCode execFullPathsInMessages(@NotNull PrintStream errStream, @NotNull String[] args) {
|
||||
return exec(errStream, Services.EMPTY, MessageRenderer.PLAIN, args);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private A parseArguments(@NotNull PrintStream errStream, @NotNull MessageRenderer messageRenderer, @NotNull String[] args) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user