mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-12-12 00:33:43 +08:00
docs: update document suggestion
This commit is contained in:
@@ -25,82 +25,7 @@ You can add this module to your project using the following method.
|
||||
|
||||
This is a Kotlin Multiplatform dependency, you need the `org.jetbrains.kotlin.multiplatform` plugin to apply the relevant dependencies.
|
||||
|
||||
We recommend using Kotlin DSL as the Gradle build script language and [SweetDependency](https://github.com/HighCapable/SweetDependency)
|
||||
to manage dependencies.
|
||||
|
||||
### SweetDependency (Recommended)
|
||||
|
||||
Add dependencies to your project `SweetDependency` configuration file.
|
||||
|
||||
```yaml
|
||||
libraries:
|
||||
com.highcapable.flexiui:
|
||||
# commonMain
|
||||
core:
|
||||
version: +
|
||||
resources:
|
||||
version: +
|
||||
# androidMain
|
||||
core-android:
|
||||
version-ref: <this>::core
|
||||
resources-android:
|
||||
version-ref: <this>::resources
|
||||
# iosArm64Main
|
||||
core-iosarm64:
|
||||
version-ref: <this>::core
|
||||
resources-iosarm64:
|
||||
version-ref: <this>::resources
|
||||
# iosX64Main
|
||||
core-iosx64:
|
||||
version-ref: <this>::core
|
||||
resources-iosx64:
|
||||
version-ref: <this>::resources
|
||||
# iosSimulatorArm64Main
|
||||
core-iossimulatorarm64:
|
||||
version-ref: <this>::core
|
||||
resources-iossimulatorarm64:
|
||||
version-ref: <this>::resources
|
||||
# desktopMain
|
||||
core-desktop:
|
||||
version-ref: <this>::core
|
||||
resources-desktop:
|
||||
version-ref: <this>::resources
|
||||
```
|
||||
|
||||
Configure dependencies in your project `build.gradle.kts`.
|
||||
|
||||
If you use multi-platform dependencies in a regular project, you only need to deploy the corresponding platform suffix dependencies as needed.
|
||||
|
||||
```kotlin
|
||||
implementation(com.highcapable.flexiui.core.android)
|
||||
implementation(com.highcapable.flexiui.core.iosarm64)
|
||||
implementation(com.highcapable.flexiui.core.iosx64)
|
||||
implementation(com.highcapable.flexiui.core.iossimulatorarm64)
|
||||
implementation(com.highcapable.flexiui.core.desktop)
|
||||
```
|
||||
|
||||
```kotlin
|
||||
implementation(com.highcapable.flexiui.resources.android)
|
||||
implementation(com.highcapable.flexiui.resources.iosarm64)
|
||||
implementation(com.highcapable.flexiui.resources.iosx64)
|
||||
implementation(com.highcapable.flexiui.resources.iossimulatorarm64)
|
||||
implementation(com.highcapable.flexiui.resources.desktop)
|
||||
```
|
||||
|
||||
If you use multi-platform dependencies in a multi-platform project, you need to add the `core` dependency in `commonMain`.
|
||||
|
||||
```kotlin
|
||||
kotlin {
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(com.highcapable.flexiui.core)
|
||||
implementation(com.highcapable.flexiui.resources)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
We recommend using Kotlin DSL as the Gradle build script language.
|
||||
|
||||
### Traditional Method
|
||||
|
||||
|
||||
Reference in New Issue
Block a user