From d0a7fe17abe55fbee568eca78560307d9c664e82 Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Thu, 3 Feb 2022 13:46:07 +0300 Subject: [PATCH] Commented out native support --- components/Kapp/demo/build.gradle.kts | 54 +++++++++++++++---- .../Kapp/demo/src/jsMain/resources/index.html | 5 ++ components/Kapp/library/build.gradle.kts | 23 +++++++- 3 files changed, 71 insertions(+), 11 deletions(-) diff --git a/components/Kapp/demo/build.gradle.kts b/components/Kapp/demo/build.gradle.kts index 26a484610d..49b8fab096 100644 --- a/components/Kapp/demo/build.gradle.kts +++ b/components/Kapp/demo/build.gradle.kts @@ -13,18 +13,55 @@ kotlin { binaries.executable() } - sourceSets { - named("desktopMain") { - dependencies { - implementation(compose.desktop.currentOs) - + /* + iosX64("uikitX64") { + binaries { + executable { + entryPoint = "main" + freeCompilerArgs += listOf( + "-linker-option", "-framework", "-linker-option", "Metal", + "-linker-option", "-framework", "-linker-option", "CoreText", + "-linker-option", "-framework", "-linker-option", "CoreGraphics" + ) + } + } + } + iosArm64("uikitArm64") { + binaries { + executable { + entryPoint = "main" + freeCompilerArgs += listOf( + "-linker-option", "-framework", "-linker-option", "Metal", + "-linker-option", "-framework", "-linker-option", "CoreText", + "-linker-option", "-framework", "-linker-option", "CoreGraphics" + ) } } - named("commonMain") { + } */ + + sourceSets { + val desktopMain by getting + + val commonMain by getting { dependencies { implementation(project(":Kapp:library")) } } + + val jsMain by getting + + /* + val uikitMain by creating { + dependsOn(commonMain) + } + + val uikitX64Main by getting { + dependsOn(uikitMain) + } + val uikitArm64Main by getting { + dependsOn(uikitMain) + } + */ } } @@ -35,9 +72,8 @@ compose.desktop { } compose.experimental { - web.application { - } - // uikit.application {} + web.application + uikit.application } tasks.withType().configureEach { diff --git a/components/Kapp/demo/src/jsMain/resources/index.html b/components/Kapp/demo/src/jsMain/resources/index.html index fbb59b4139..7ee2aa6750 100644 --- a/components/Kapp/demo/src/jsMain/resources/index.html +++ b/components/Kapp/demo/src/jsMain/resources/index.html @@ -12,5 +12,10 @@ + diff --git a/components/Kapp/library/build.gradle.kts b/components/Kapp/library/build.gradle.kts index 5ee350494b..5c7851aedf 100644 --- a/components/Kapp/library/build.gradle.kts +++ b/components/Kapp/library/build.gradle.kts @@ -12,9 +12,11 @@ kotlin { js(IR) { browser() } + iosX64("uikitX64") + iosArm64("uikitArm64") sourceSets { - named("commonMain") { + val commonMain by getting { dependencies { api(compose.runtime) api(compose.foundation) @@ -22,7 +24,24 @@ kotlin { api(compose.ui) } } - named("desktopMain") + val desktopMain by getting { + dependencies { + implementation(compose.desktop.currentOs) + } + } + val jsMain by getting + + /* + val uikitMain by creating { + dependsOn(commonMain) + } + + val uikitX64Main by getting { + dependsOn(uikitMain) + } + val uikitArm64Main by getting { + dependsOn(uikitMain) + } */ } }