mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Add Gradle Kotlin DSL for dependencies (#719)
* Add Kotlin DSL for dependencies * Use the "Kotlin" sytnax
This commit is contained in:
12
README.md
12
README.md
@@ -504,8 +504,8 @@ The reflection adapter requires the following additional dependency:
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
```groovy
|
```kotlin
|
||||||
implementation 'com.squareup.moshi:moshi-kotlin:1.7.0'
|
implementation("com.squareup.moshi:moshi-kotlin:1.7.0")
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the reflection adapter transitively depends on the `kotlin-reflect` library which is a
|
Note that the reflection adapter transitively depends on the `kotlin-reflect` library which is a
|
||||||
@@ -540,8 +540,8 @@ add the following to your build to enable the annotation processor:
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
```groovy
|
```kotlin
|
||||||
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.7.0'
|
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.7.0")
|
||||||
```
|
```
|
||||||
|
|
||||||
You must also have the `kotlin-stdlib` dependency on the classpath during compilation in order for
|
You must also have the `kotlin-stdlib` dependency on the classpath during compilation in order for
|
||||||
@@ -571,8 +571,8 @@ Download [the latest JAR][dl] or depend via Maven:
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
or Gradle:
|
or Gradle:
|
||||||
```groovy
|
```kotlin
|
||||||
implementation 'com.squareup.moshi:moshi:1.7.0'
|
implementation("com.squareup.moshi:moshi:1.7.0")
|
||||||
```
|
```
|
||||||
|
|
||||||
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
|
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
|
||||||
|
Reference in New Issue
Block a user