RetrofitKit

Multiple Converter Factory & Base Class for Retrofit.

        
        kotlin ~ $ 
      

Installation

  • gradle
            
              allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
//add dependency
dependencies {
    implementation 'com.github.jamesdeperio:RetrofitKit:v1.0.5'

    //required dependencies
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'

    //add rxjava adapter
    implementation 'com.squareup.retrofit2:adapter-rxjava2:x.x.x'

    //or add Kotlin coroutine's adapter
    implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:x.x.x'

    //then add your converter factory library
}

Clean Code

For better readability and understanding.

Custom Converter

You can create your own converter and annotation the assign it.

Lazy Coding

Don't code too much! You can minify and remove boilerplate.

Read the documentation for better understanding and customization

Documentation

Changelog

v1.0.5

10/11/2018
  • FIXED: Failed to resolve: com.github.jamesdeperio:RetrofitKit:v1.0.4 on jitpack
  • UPDATED: Maven dependency version to 2.1
  • MERGED: PR of @marjorietiozon for synchronization of retrofit instance
  • RENAMED: initRxAdapterFactory to initCallAdapterFactory

v1.0.3

10/10/2018
  • FIXED: interceptorConfiguration was not executed in debug mode
  • MERGED: PR of @yuelvic for code optimization

v1.0.2

9/27/2018
  • UPDATED: kotlin dependency to v1.2.71
  • UPDATED: gradle dependency to v3.2.0
  • CHANGES: need to include retrofit and okhttp3:logging-interceptor dependency

v1.0.1

8/24/2018
  • Updated: kotlin dependency
  • Updated: okhttp3:logging-interceptor dependency
  • Fixed: exclude 'META-INF/app_release.kotlin_module'

v1.0.0

5/10/2018
  • Created: base class for lazy retrofit configuration
  • Created: multiple converter