ansman/kotshi

Implementation documentation or sample app?

Closed this issue · 5 comments

Good day, I have some performance issue using Moshi as adapter and it says that Kotshi will be the current solution from this thread.

Unfortunately I do not understand how to properly implement this dependency as I can't see any example of using this in a sample app so far I am facing an error Failed to resolve: se.ansman.kotshi:api:2.4.0.

This is my dependencies so far

//    kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.11.0'
    implementation 'com.squareup.moshi:moshi-kotlin:1.11.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'

    implementation 'se.ansman.kotshi:api:2.4.0'
    kapt 'se.ansman.kotshi:compiler:2.4.0'

    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'

project level gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven { url "https://jitpack.io" }
        maven { url "https://google.bintray.com/flexbox-layout" }
        maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.0-alpha10"
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-M1'

        classpath 'com.google.gms:google-services:4.3.5'

        // Add the Crashlytics Gradle plugin.
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven { url "https://jitpack.io" }
        maven { url "https://google.bintray.com/flexbox-layout" }
        maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Looks like the API artifact didn't sync properly to Maven Central. I've synced it again and it should work soon. Until then you can use version 2.3.3

Thanks, I just tried adding jcenter() but I am avoiding using this as it will soon shutdown. Does 2.3.3 is in maven central?

Yeah, you shouldn't have to use jcenter. 2.3.3 is synced there and 2.4 should show up in an hour or two

Yeah, you shouldn't have to use jcenter. 2.3.3 is synced there and 2.4 should show up in an hour or two

Great, thank you so much for a very quick support

@ArcherEmiya05 No problem, sorry for the trouble. 2.4.0 is synced now: https://repo1.maven.org/maven2/se/ansman/kotshi/api/2.4.0/