Browse Source

[resources] Delete macos native target from the demo app.

Because resources are not supported on native message targets.
pull/4651/head
Konstantin Tskhovrebov 4 weeks ago
parent
commit
031359e186
  1. 4
      components/README.md
  2. 11
      components/resources/demo/shared/build.gradle.kts
  3. 1
      components/resources/demo/shared/src/macosMain/composeResources/files/platform-text.txt
  4. 17
      components/resources/demo/shared/src/macosMain/kotlin/main.macos.kt

4
components/README.md

@ -13,10 +13,6 @@ in Android Studio or in AppCode with [installed CocoaPods](https://kotlinlang.or
### Run JS in browser with WebAssembly Skia via Gradle:
`./gradlew :resources:demo:shared:jsBrowserDevelopmentRun`
### Run MacOS via Gradle:
- on Intel CPU: `./gradlew :resources:demo:shared:runDebugExecutableMacosX64`
- on Apple Silicon: `./gradlew :resources:demo:shared:runDebugExecutableMacosArm64`
# Tests
Run script:
```bash

11
components/resources/demo/shared/build.gradle.kts

@ -39,17 +39,6 @@ kotlin {
binaries.executable()
}
listOf(
macosX64(),
macosArm64()
).forEach { macosTarget ->
macosTarget.binaries {
executable {
entryPoint = "main"
}
}
}
applyDefaultHierarchyTemplate()
sourceSets {
val desktopMain by getting

1
components/resources/demo/shared/src/macosMain/composeResources/files/platform-text.txt

@ -1 +0,0 @@
macOS platform

17
components/resources/demo/shared/src/macosMain/kotlin/main.macos.kt

@ -1,17 +0,0 @@
/*
* Copyright 2020-2022 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/
import androidx.compose.ui.window.Window
import org.jetbrains.compose.resources.demo.shared.UseResources
import platform.AppKit.NSApp
import platform.AppKit.NSApplication
fun main() {
NSApplication.sharedApplication()
Window("Resources demo") {
UseResources()
}
NSApp?.run()
}
Loading…
Cancel
Save