Produciton code uses a shared application between many projects.
Tests always dispose the application together with JetCoreEnvironment
This commit is contained in:
@@ -47,7 +47,7 @@ public class BuiltInsSerializer {
|
||||
try {
|
||||
List<File> sourceFiles = FileUtil.findFilesByMask(Pattern.compile(".*\\.kt"), new File(BUILT_INS_SRC_DIR));
|
||||
CompilerConfiguration configuration = new CompilerConfiguration();
|
||||
JetCoreEnvironment environment = new JetCoreEnvironment(rootDisposable, configuration);
|
||||
JetCoreEnvironment environment = JetCoreEnvironment.createForTests(rootDisposable, configuration);
|
||||
List<JetFile> files = JetTestUtils.loadToJetFiles(environment, sourceFiles);
|
||||
|
||||
ModuleDescriptor module = LazyResolveTestUtil.resolveLazily(files, environment, false);
|
||||
|
||||
@@ -72,7 +72,7 @@ public class GenerateJavaToKotlinMethodMap {
|
||||
|
||||
Disposable disposable = CompileEnvironmentUtil.createMockDisposable();
|
||||
try {
|
||||
JetCoreEnvironment coreEnvironment = new JetCoreEnvironment(disposable, configuration);
|
||||
JetCoreEnvironment coreEnvironment = JetCoreEnvironment.createForProduction(disposable, configuration);
|
||||
|
||||
StringBuilder buf = new StringBuilder();
|
||||
Printer printer = new Printer(buf);
|
||||
|
||||
Reference in New Issue
Block a user