docs: update guide

This commit is contained in:
2025-10-07 08:26:25 +08:00
parent afa0ee5c2e
commit 04b44ddec9
2 changed files with 12 additions and 12 deletions

View File

@@ -115,7 +115,7 @@ If you need to customize the class name and package name of `AdapterRegistry`, y
```kotlin
ksp {
// Customize the package name of AdapterRegistry, if it's an Android project, it's recommended to directly use "android.namespace"
arg("moshi-companion.generateAdapterRegistryPackageName", "com.yourdomain.yourpackage.generated")
arg("moshi-companion.generateAdapterRegistryPackageName", "com.yourdomain.yourpackage")
// Customize the class name of AdapterRegistry
arg("moshi-companion.generateAdapterRegistryClassName", "YourCustomMoshiAdapterRegistry")
}
@@ -198,10 +198,10 @@ Currently in Android projects, this issue may occur in the main project module (
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro",
// Specify the ProGuard rules file generated by Moshi Companion
file("build/generated/ksp/release/resources/META-INF/proguard/").listFiles()!!.first()
)
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
// Specify the ProGuard rules file generated by Moshi Companion
file("build/generated/ksp/release/resources/META-INF/proguard/").listFiles()?.firstOrNull()?.let {
proguardFiles(it)
}
}
```