Remove KAPT support (#1848)

* Remove KAPT support

* Stick KSP on the root classpath

* Another

* Another
This commit is contained in:
Zac Sweers
2024-06-03 10:35:36 -04:00
committed by GitHub
parent c8cda23160
commit b648d6ee33
15 changed files with 7 additions and 1764 deletions

View File

@@ -1076,7 +1076,7 @@ Note that the reflection adapter transitively depends on the `kotlin-reflect` li
#### Codegen
Moshis Kotlin codegen support can be used as an annotation processor (via [kapt][kapt]) or Kotlin SymbolProcessor ([KSP][ksp]).
Moshis 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