mirror of
https://github.com/fankes/pagecurl-multiplatform.git
synced 2025-09-06 02:35:25 +08:00
feat: support compose multiplatform
This commit is contained in:
1
samples/desktopApp/.gitignore
vendored
Normal file
1
samples/desktopApp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
29
samples/desktopApp/build.gradle.kts
Normal file
29
samples/desktopApp/build.gradle.kts
Normal file
@@ -0,0 +1,29 @@
|
||||
plugins {
|
||||
autowire(libs.plugins.kotlin.multiplatform)
|
||||
autowire(libs.plugins.jetbrains.compose)
|
||||
}
|
||||
|
||||
group = property.project.groupName
|
||||
|
||||
kotlin {
|
||||
jvm("desktop")
|
||||
jvmToolchain(17)
|
||||
sourceSets {
|
||||
val desktopMain by getting {
|
||||
dependencies {
|
||||
implementation(projects.samples.shared)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
application {
|
||||
mainClass = "${property.project.groupName}.MainKt"
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package eu.wewox.pagecurl
|
||||
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
import androidx.compose.ui.window.rememberWindowState
|
||||
|
||||
fun main() = application {
|
||||
Window(
|
||||
onCloseRequest = ::exitApplication,
|
||||
title = "PageCurl Demo",
|
||||
state = rememberWindowState(width = 450.dp, height = 750.dp)
|
||||
) { App() }
|
||||
}
|
Reference in New Issue
Block a user