Do not use CommonPlatforms directly in CommonResolverForModuleFactory

This allows to get rid of dependency of this code on CommonPlatforms,
which depends on all platforms (JVM, JS, Native), and eventually move it
to 'frontend'.
This commit is contained in:
Alexander Udalov
2020-03-15 12:24:42 +01:00
committed by Alexander Udalov
parent 8dd04789ad
commit 9e014e462b
4 changed files with 15 additions and 10 deletions
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.descriptors.commonizer.utils.assertIsDirectory
import org.jetbrains.kotlin.descriptors.commonizer.utils.assertModulesAreEqual
import org.jetbrains.kotlin.descriptors.commonizer.utils.assertValidModule
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.platform.CommonPlatforms
import org.jetbrains.kotlin.psi.KtPsiFactory
import org.jetbrains.kotlin.test.KotlinTestUtils.*
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase
@@ -123,7 +124,8 @@ abstract class AbstractCommonizationFromSourcesTest : KtUsefulTestCase() {
files = psiFiles,
moduleName = environment.moduleName,
dependOnBuiltIns = true,
languageVersionSettings = environment.configuration.languageVersionSettings
languageVersionSettings = environment.configuration.languageVersionSettings,
targetPlatform = CommonPlatforms.defaultCommonPlatform
) { content ->
environment.createPackagePartProvider(content.moduleContentScope)
}.moduleDescriptor