MPP: Fix compatibility issue with Android Studio 3.3 Canary 7
'TargetPlatformKind' is still used in AS 3.3 so we can't remove it entirely yet.
This commit is contained in:
@@ -82,4 +82,13 @@ class JSLibraryType : LibraryType<DummyLibraryProperties>(JSLibraryKind) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun isAcceptedForJsLibrary(extension: String?) = extension == "js" || extension == "kjsm"
|
||||
private fun isAcceptedForJsLibrary(extension: String?) = extension == "js" || extension == "kjsm"
|
||||
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
// Can't import a member annotated with DEPRECATION_ERROR
|
||||
val org.jetbrains.kotlin.config.TargetPlatformKind<*>.libraryKind: PersistentLibraryKind<*>?
|
||||
get() = when (this) {
|
||||
org.jetbrains.kotlin.config.TargetPlatformKind.JavaScript -> JSLibraryKind
|
||||
org.jetbrains.kotlin.config.TargetPlatformKind.Common -> CommonLibraryKind
|
||||
else -> null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user