docs: update guide

This commit is contained in:
2023-11-03 22:35:15 +08:00
parent 609cbe644d
commit 6963f1ca36
2 changed files with 8 additions and 19 deletions

View File

@@ -81,15 +81,6 @@ Please replace `<version>` in the above code with the latest version in
After the above configuration is complete, run Gradle Sync once.
**Possible Problems**
If running Gradle Sync fails with the error `Cannot have abstract method KotlinTarget. withSourcesJar()`,
this may be a problem with the Kotlin plugin version of your current project.
This problem is an error caused by upgrading the Kotlin plugin from `1.8.0+``1.9.0+`.
The solution is to modify the version of the Kotlin plugin to `1.9.0+`.
**Pay Attention**
`SweetDependency` will replace the repositories set in `pluginManagement` and `dependencyResolutionManagement`,
@@ -872,14 +863,16 @@ dependencies {
In Kotlin Multiplatform, it is consistent with the general dependency deployment method.
To resolve possible plugin conflicts, whether Kotlin or Groovy, you need to use `sweet.autowire`.
> Kotlin DSL
```kotlin
sourceSets {
val androidMain by getting {
dependencies {
implementation(autowire("androidx.core:core-ktx"))
implementation(autowire("libs/*.jar"))
implementation(sweet.autowire("androidx.core:core-ktx"))
implementation(sweet.autowire("libs/*.jar"))
}
}
}