Consistent naming: common platform is common, not default
This commit is contained in:
@@ -234,7 +234,7 @@ interface ModuleInfo {
|
||||
// but if they are present, they should come after JVM built-ins in the dependencies list, because JVM built-ins contain
|
||||
// additional members dependent on the JDK
|
||||
fun dependencyOnBuiltIns(): ModuleInfo.DependencyOnBuiltIns =
|
||||
if (platform == TargetPlatform.Default)
|
||||
if (platform == TargetPlatform.Common)
|
||||
ModuleInfo.DependencyOnBuiltIns.AFTER_SDK
|
||||
else
|
||||
ModuleInfo.DependencyOnBuiltIns.LAST
|
||||
|
||||
+4
-4
@@ -46,9 +46,9 @@ import org.jetbrains.kotlin.serialization.deserialization.MetadataPackageFragmen
|
||||
|
||||
/**
|
||||
* A facade that is used to analyze common (platform-independent) modules in multi-platform projects.
|
||||
* See [TargetPlatform.Default]
|
||||
* See [TargetPlatform.Common]
|
||||
*/
|
||||
object DefaultAnalyzerFacade : AnalyzerFacade() {
|
||||
object CommonAnalyzerFacade : AnalyzerFacade() {
|
||||
private class SourceModuleInfo(
|
||||
override val name: Name,
|
||||
override val capabilities: Map<ModuleDescriptor.Capability<*>, Any?>,
|
||||
@@ -77,7 +77,7 @@ object DefaultAnalyzerFacade : AnalyzerFacade() {
|
||||
@Suppress("NAME_SHADOWING")
|
||||
val resolver = ResolverForProjectImpl (
|
||||
"sources for metadata serializer",
|
||||
ProjectContext(project), listOf(moduleInfo), { DefaultAnalyzerFacade },
|
||||
ProjectContext(project), listOf(moduleInfo), { CommonAnalyzerFacade },
|
||||
{ ModuleContent(files, GlobalSearchScope.allScope(project)) },
|
||||
object : PlatformAnalysisParameters {},
|
||||
languageSettingsProvider = object : LanguageSettingsProvider {
|
||||
@@ -159,5 +159,5 @@ object DefaultAnalyzerFacade : AnalyzerFacade() {
|
||||
}
|
||||
|
||||
override val targetPlatform: TargetPlatform
|
||||
get() = TargetPlatform.Default
|
||||
get() = TargetPlatform.Common
|
||||
}
|
||||
@@ -170,7 +170,7 @@ fun createLazyResolveSession(moduleContext: ModuleContext, files: Collection<KtF
|
||||
moduleContext,
|
||||
FileBasedDeclarationProviderFactory(moduleContext.storageManager, files),
|
||||
BindingTraceContext(),
|
||||
TargetPlatform.Default,
|
||||
TargetPlatform.Common,
|
||||
TargetPlatformVersion.NoVersion,
|
||||
CompilerEnvironment,
|
||||
LanguageVersionSettingsImpl.DEFAULT
|
||||
|
||||
@@ -39,7 +39,7 @@ abstract class TargetPlatform(val platformName: String) {
|
||||
|
||||
abstract val multiTargetPlatform: MultiTargetPlatform
|
||||
|
||||
object Default : TargetPlatform("Default") {
|
||||
object Common : TargetPlatform("Default") {
|
||||
private val defaultImports = LockBasedStorageManager().createMemoizedFunction<Boolean, List<ImportPath>> {
|
||||
includeKotlinComparisons ->
|
||||
ArrayList<ImportPath>().apply {
|
||||
|
||||
Reference in New Issue
Block a user