
Simplifies app development by providing default networking, storage, dependency injection, plugin system, material icons and monospaced font, logging and SQL storage, plus Chinese-text rendering fixes.
boot 旨在通过默认的网络、存储、依赖注入、插件实现,简化kmp跨平台应用开发.
gradle/libs.version.toml
[versions]
boot = "0.0.1"
[libraries]
boot-shared = { module = "com.yuanjingtech.boot.app.kmp:shared", version.ref = "boot" }
[bundles]
feature = [
"boot-shared",
]feature/build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
api(libs.bundles.feature)
}
}
}App.kt
@Composable
@Preview
fun App() {
BootApp(config = KoinConfiguration {
printLogger()
}) {
Content()
}
}This is a Kotlin Multiplatform project targeting Android, iOS, Web, Desktop (JVM), Server.
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
/iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
/server is for the Ktor server application.
/shared is for the code that will be shared between all targets in the project. The most important subfolder is commonMain. If preferred, you can add code to the platform-specific folders here too.
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
./gradlew :composeApp:assembleDebug.\gradlew.bat :composeApp:assembleDebugTo build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
./gradlew :composeApp:run.\gradlew.bat :composeApp:runTo build and run the development version of the server, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
./gradlew :server:run.\gradlew.bat :server:runTo build and run the development version of the web app, use the run configuration from the run widget in your IDE's toolbar or run it directly from the terminal:
./gradlew :composeApp:wasmJsBrowserDevelopmentRun.\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun./gradlew :composeApp:jsBrowserDevelopmentRun.\gradlew.bat :composeApp:jsBrowserDevelopmentRunTo build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Learn more about Kotlin Multiplatform, Compose Multiplatform, Kotlin/Wasm…
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel #compose-web. If you face any issues, please report them on YouTrack.
boot 旨在通过默认的网络、存储、依赖注入、插件实现,简化kmp跨平台应用开发.
gradle/libs.version.toml
[versions]
boot = "0.0.1"
[libraries]
boot-shared = { module = "com.yuanjingtech.boot.app.kmp:shared", version.ref = "boot" }
[bundles]
feature = [
"boot-shared",
]feature/build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
api(libs.bundles.feature)
}
}
}App.kt
@Composable
@Preview
fun App() {
BootApp(config = KoinConfiguration {
printLogger()
}) {
Content()
}
}This is a Kotlin Multiplatform project targeting Android, iOS, Web, Desktop (JVM), Server.
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
/iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
/server is for the Ktor server application.
/shared is for the code that will be shared between all targets in the project. The most important subfolder is commonMain. If preferred, you can add code to the platform-specific folders here too.
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
./gradlew :composeApp:assembleDebug.\gradlew.bat :composeApp:assembleDebugTo build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
./gradlew :composeApp:run.\gradlew.bat :composeApp:runTo build and run the development version of the server, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
./gradlew :server:run.\gradlew.bat :server:runTo build and run the development version of the web app, use the run configuration from the run widget in your IDE's toolbar or run it directly from the terminal:
./gradlew :composeApp:wasmJsBrowserDevelopmentRun.\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun./gradlew :composeApp:jsBrowserDevelopmentRun.\gradlew.bat :composeApp:jsBrowserDevelopmentRunTo build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Learn more about Kotlin Multiplatform, Compose Multiplatform, Kotlin/Wasm…
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel #compose-web. If you face any issues, please report them on YouTrack.