Skip to content

Instantly share code, notes, and snippets.

@navi25
Created January 13, 2019 22:38
Show Gist options
  • Save navi25/af8a2b93b3defb8a497a4fec86323ce5 to your computer and use it in GitHub Desktop.
Save navi25/af8a2b93b3defb8a497a4fec86323ce5 to your computer and use it in GitHub Desktop.
// build.gradle(Module: app)
dependencies {
def moshiVersion="1.8.0"
def retrofit2_version = "2.5.0"
def okhttp3_version = "3.12.0"
def kotlinCoroutineVersion = "1.0.1"
def picassoVersion = "2.71828"
//Moshi
implementation "com.squareup.moshi:moshi-kotlin:$moshiVersion"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"
//Retrofit2
implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
implementation "com.squareup.retrofit2:converter-moshi:$retrofit2_version"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
//Okhttp3
implementation "com.squareup.okhttp3:okhttp:$okhttp3_version"
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
//Picasso for Image Loading
implementation ("com.squareup.picasso:picasso:$picassoVersion"){
exclude group: "com.android.support"
}
//Kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutineVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutineVersion"
}
@santiagocarod
Copy link

I think there is a problem with line 13

Instead of kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"

It should be implementation "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"

I'm just learning but I think it could help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment