コード例 #1
0
 @Override
 protected KotlinCoreEnvironment createEnvironment() {
   File javaFilesDir = createJavaFilesDir();
   return KotlinCoreEnvironment.createForTests(
       getTestRootDisposable(),
       KotlinTestUtils.compilerConfigurationForTests(
           ConfigurationKind.ALL,
           TestJdkKind.FULL_JDK,
           Arrays.asList(KotlinTestUtils.getAnnotationsJar()),
           Arrays.asList(javaFilesDir)),
       EnvironmentConfigFiles.JVM_CONFIG_FILES);
 }
コード例 #2
0
  @NotNull
  private KotlinCoreEnvironment createEnvironment(@NotNull List<File> extraClassPath) {
    List<File> extras = new ArrayList<File>();
    extras.addAll(extraClassPath);
    extras.add(KotlinTestUtils.getAnnotationsJar());

    CompilerConfiguration configuration =
        KotlinTestUtils.compilerConfigurationForTests(
            ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, extras.toArray(new File[extras.size()]));
    return KotlinCoreEnvironment.createForTests(
        getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
  }