KotlinCoreEnvironment env = KotlinCoreEnvironment.createForProduction( disposable, compilerConfiguration, EnvironmentConfigFiles.JVM_CONFIG_FILES); KotlinToJVMBytecodeCompiler.INSTANCE.compileBunchOfSources( env, null, classesDir.toFile(), new ArrayList<>(), false);
); KotlinCoreEnvironment environment = KotlinCoreEnvironment.createForProduction(rootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); GenerationState state = KotlinToJVMBytecodeCompiler.INSTANCE.analyzeAndGenerate(environment); KtScript script = environment.getSourceFiles().get(0).getScript(); FqName nameForScript = script.getFqName();