Browse Source

Commented out native support

app-api
Nikolay Igotti 3 years ago
parent
commit
d0a7fe17ab
  1. 54
      components/Kapp/demo/build.gradle.kts
  2. 5
      components/Kapp/demo/src/jsMain/resources/index.html
  3. 23
      components/Kapp/library/build.gradle.kts

54
components/Kapp/demo/build.gradle.kts

@ -13,18 +13,55 @@ kotlin {
binaries.executable() binaries.executable()
} }
sourceSets { /*
named("desktopMain") { iosX64("uikitX64") {
dependencies { binaries {
implementation(compose.desktop.currentOs) 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 { dependencies {
implementation(project(":Kapp:library")) 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 { compose.experimental {
web.application { web.application
} uikit.application
// uikit.application {}
} }
tasks.withType<KotlinCompile>().configureEach { tasks.withType<KotlinCompile>().configureEach {

5
components/Kapp/demo/src/jsMain/resources/index.html

@ -12,5 +12,10 @@
<canvas id="ComposeTarget" width="800" height="600"></canvas> <canvas id="ComposeTarget" width="800" height="600"></canvas>
</div> </div>
<script src="demo.js"> </script> <script src="demo.js"> </script>
<script type="text/javascript">
document.getElementById('ComposeTarget').onselectstart = function(){
return false;
};
</script>
</body> </body>
</html> </html>

23
components/Kapp/library/build.gradle.kts

@ -12,9 +12,11 @@ kotlin {
js(IR) { js(IR) {
browser() browser()
} }
iosX64("uikitX64")
iosArm64("uikitArm64")
sourceSets { sourceSets {
named("commonMain") { val commonMain by getting {
dependencies { dependencies {
api(compose.runtime) api(compose.runtime)
api(compose.foundation) api(compose.foundation)
@ -22,7 +24,24 @@ kotlin {
api(compose.ui) 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)
} */
} }
} }

Loading…
Cancel
Save