Skip to content

Commit

Permalink
Components. Downgrade to Kotlin 1.8.22 (#3390)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
igordmn authored Jul 24, 2023
1 parent 336ba2c commit a609db5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/resources/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ kotlin {
dependsOn(jvmAndAndroidMain)
dependsOn(commonButJSMain)
}
val androidUnitTest by getting {
val androidTest by getting {
dependencies {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit a609db5

Please sign in to comment.