Finally drop attaching stdlib sources everywhere

This commit is contained in:
Maxim Shafirov
2012-01-24 17:20:19 +04:00
parent 00667b14e7
commit 81ef081a87
17 changed files with 155 additions and 186 deletions
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/core/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="cli" />
</component>
</module>
@@ -20,15 +20,7 @@ public class BytecodeCompiler {
* @return new {@link CompileEnvironment} instance
*/
private CompileEnvironment createCompileEnvironment () {
CompileEnvironment environment = new CompileEnvironment();
environment.setJavaRuntime( CompileEnvironment.findRtJar( true ));
if ( ! environment.initializeKotlinRuntime()) {
throw new RuntimeException( "No Kotlin runtime library found" );
}
return environment;
return new CompileEnvironment();
}
@@ -50,7 +42,7 @@ public class BytecodeCompiler {
* @param excludeStdlib whether Kotlin standard library is excluded in compilation
*/
public void sourcesToDir ( String source, String destination, boolean excludeStdlib ) {
boolean success = ENV.compileBunchOfSources( source, null, destination, true, ! excludeStdlib );
boolean success = ENV.compileBunchOfSources( source, null, destination, true);
if ( ! success ) {
throw new RuntimeException( compilationError( source ));
}
@@ -66,7 +58,7 @@ public class BytecodeCompiler {
* @param excludeStdlib whether Kotlin standard library is excluded in compilation
*/
public void sourcesToJar ( String source, String jar, boolean includeRuntime, boolean excludeStdlib ) {
boolean success = ENV.compileBunchOfSources( source, jar, null, includeRuntime, ! excludeStdlib );
boolean success = ENV.compileBunchOfSources( source, jar, null, includeRuntime);
if ( ! success ) {
throw new RuntimeException( compilationError( source ));
}