Replaced jdk-headers with jdk-annotations everywhere.

This commit is contained in:
Evgeny Gerashchenko
2012-07-02 23:48:27 +04:00
parent 53cdbe486d
commit 77df57c150
20 changed files with 143 additions and 145 deletions
@@ -57,17 +57,17 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments, K2JVMComp
protected ExitCode doExecute(K2JVMCompilerArguments arguments, PrintingMessageCollector messageCollector, Disposable rootDisposable) {
CompilerSpecialMode mode = parseCompilerSpecialMode(arguments);
File jdkHeadersJar;
if (mode.includeJdkHeaders()) {
if (arguments.jdkHeaders != null) {
jdkHeadersJar = new File(arguments.jdkHeaders);
File jdkAnnotationsJar;
if (mode.includeJdkAnnotations()) {
if (arguments.jdkAnnotations != null) {
jdkAnnotationsJar = new File(arguments.jdkAnnotations);
}
else {
jdkHeadersJar = PathUtil.getAltHeadersPath();
jdkAnnotationsJar = PathUtil.getJdkAnnotationsPath();
}
}
else {
jdkHeadersJar = null;
jdkAnnotationsJar = null;
}
File runtimeJar;
@@ -83,7 +83,7 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments, K2JVMComp
runtimeJar = null;
}
CompilerDependencies dependencies = new CompilerDependencies(mode, CompilerDependencies.findRtJar(), jdkHeadersJar, runtimeJar);
CompilerDependencies dependencies = new CompilerDependencies(mode, CompilerDependencies.findRtJar(), jdkAnnotationsJar, runtimeJar);
final List<String> argumentsSourceDirs = arguments.getSourceDirs();
if (!arguments.script &&
@@ -57,8 +57,8 @@ public class K2JVMCompilerArguments extends CompilerArguments {
@Argument(value = "stdlib", description = "Path to the stdlib.jar")
public String stdlib;
@Argument(value = "jdkHeaders", description = "Path to the kotlin-jdk-headers.jar")
public String jdkHeaders;
@Argument(value = "jdkAnnotations", description = "Path to the kotlin-jdk-annotations.jar")
public String jdkAnnotations;
@Argument(value = "mode", description = "Special compiler modes: stubs or jdkHeaders")
public String mode;
@@ -90,9 +90,9 @@ public class JetCoreEnvironment extends JavaCoreEnvironment {
}
annotationsProvider = new CoreAnnotationsProvider();
if (compilerSpecialMode.includeJdkHeaders()) {
for (VirtualFile root : compilerDependencies.getJdkHeaderRoots()) {
addLibraryRoot(root);
if (compilerSpecialMode.includeJdkAnnotations()) {
for (VirtualFile root : compilerDependencies.getJdkAnnotationsRoots()) {
annotationsProvider.addExternalAnnotationsRoot(root);
}
}