mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Remove KAPT support (#1848)
* Remove KAPT support * Stick KSP on the root classpath * Another * Another
This commit is contained in:
20
README.md
20
README.md
@@ -1076,7 +1076,7 @@ Note that the reflection adapter transitively depends on the `kotlin-reflect` li
|
||||
|
||||
#### Codegen
|
||||
|
||||
Moshi’s Kotlin codegen support can be used as an annotation processor (via [kapt][kapt]) or Kotlin SymbolProcessor ([KSP][ksp]).
|
||||
Moshi’s Kotlin codegen support can be used as a Kotlin SymbolProcessor ([KSP][ksp]).
|
||||
It generates a small and fast adapter for each of your Kotlin classes at compile-time. Enable it by annotating
|
||||
each class that you want to encode as JSON:
|
||||
|
||||
@@ -1109,23 +1109,6 @@ dependencies {
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Kapt</summary>
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.squareup.moshi</groupId>
|
||||
<artifactId>moshi-kotlin-codegen</artifactId>
|
||||
<version>1.15.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
```kotlin
|
||||
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.15.1")
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Limitations
|
||||
|
||||
If your Kotlin class has a superclass, it must also be a Kotlin class. Neither reflection or codegen
|
||||
@@ -1190,5 +1173,4 @@ License
|
||||
[okhttp]: https://github.com/square/okhttp/
|
||||
[gson]: https://github.com/google/gson/
|
||||
[javadoc]: https://square.github.io/moshi/1.x/moshi/
|
||||
[kapt]: https://kotlinlang.org/docs/reference/kapt.html
|
||||
[ksp]: https://github.com/google/ksp
|
||||
|
Reference in New Issue
Block a user