Browse Source

Components. Downgrade to Kotlin 1.8.22 (#3390)

Dowgrading to Kotlin 1.8 will allow to use `components` in Kotlin 1.8 and Kotlin 1.9 projects (iOS, JS targets). Now it is supported only in Kotlin 1.9 projects.
pull/3402/head v1.5.0-dev1122
Igor Demin 1 year ago committed by GitHub
parent
commit
a609db563a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/gradle.properties
  2. 2
      components/resources/library/build.gradle.kts
  3. 2
      components/resources/library/src/iosMain/kotlin/org/jetbrains/compose/resources/Resource.ios.kt
  4. 2
      components/resources/library/src/macosMain/kotlin/org/jetbrains/compose/resources/Resource.macos.kt

2
components/gradle.properties

@ -3,7 +3,7 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
# __KOTLIN_COMPOSE_VERSION__
kotlin.version=1.9.0
kotlin.version=1.8.22
# __LATEST_COMPOSE_RELEASE_VERSION__
compose.version=1.5.0-dev1112
agp.version=7.3.1

2
components/resources/library/build.gradle.kts

@ -63,7 +63,7 @@ kotlin {
dependsOn(jvmAndAndroidMain)
dependsOn(commonButJSMain)
}
val androidUnitTest by getting {
val androidTest by getting {
dependencies {
}

2
components/resources/library/src/iosMain/kotlin/org/jetbrains/compose/resources/Resource.ios.kt

@ -5,7 +5,6 @@
package org.jetbrains.compose.resources
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.usePinned
import platform.Foundation.NSBundle
@ -18,7 +17,6 @@ actual fun resource(path: String): Resource = UIKitResourceImpl(path)
@ExperimentalResourceApi
private class UIKitResourceImpl(path: String) : AbstractResourceImpl(path) {
@OptIn(ExperimentalForeignApi::class)
override suspend fun readBytes(): ByteArray {
val fileManager = NSFileManager.defaultManager()
// todo: support fallback path at bundle root?

2
components/resources/library/src/macosMain/kotlin/org/jetbrains/compose/resources/Resource.macos.kt

@ -5,7 +5,6 @@
package org.jetbrains.compose.resources
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.usePinned
import platform.Foundation.NSData
@ -17,7 +16,6 @@ actual fun resource(path: String): Resource = MacOSResourceImpl(path)
@ExperimentalResourceApi
private class MacOSResourceImpl(path: String) : AbstractResourceImpl(path) {
@OptIn(ExperimentalForeignApi::class)
override suspend fun readBytes(): ByteArray {
val currentDirectoryPath = NSFileManager.defaultManager().currentDirectoryPath
val contentsAtPath: NSData? = NSFileManager.defaultManager().run {

Loading…
Cancel
Save