Added CompileEnvironment.dispose() in KotlinCompiler to restore original Application after compilation.
This commit is contained in:
@@ -97,6 +97,7 @@ public class KotlinCompiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CompileEnvironment environment = new CompileEnvironment(arguments.transformNamesToJava ? ANY_EXTENSION_TO_JAVA : FileNameTransformer.IDENTITY);
|
CompileEnvironment environment = new CompileEnvironment(arguments.transformNamesToJava ? ANY_EXTENSION_TO_JAVA : FileNameTransformer.IDENTITY);
|
||||||
|
try {
|
||||||
environment.setIgnoreErrors(arguments.ignoreErrors);
|
environment.setIgnoreErrors(arguments.ignoreErrors);
|
||||||
environment.setErrorStream(errStream);
|
environment.setErrorStream(errStream);
|
||||||
|
|
||||||
@@ -115,5 +116,8 @@ public class KotlinCompiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
} finally {
|
||||||
|
environment.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user