A sweet, small set of Kotlin functions to reduce your android boilerplate code
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app Update build gradle for AS 3.1 Apr 21, 2018
k4kotlin-retrofit onUnsuccessfulResponseOrFailureNotCancelled method fixed Feb 23, 2018
.gitignore fixed untracked files Nov 4, 2017
README.md Update README.md Aug 14, 2018
gradlew Initial commit Jun 24, 2017
gradlew.bat Initial commit Jun 24, 2017


K4Kotlin Release

A sweet, small set of Kotlin functions to reduce your android boilerplate code


Add this in your project level build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
        maven { url "https://jitpack.io" } // add this line

Then, add the library to your module build.gradle

dependencies {
    // K4Kotlin core extension functions
    compile 'com.github.kirtan403.k4kotlin:k4kotlin:0.5.4'
    // Extensions for Retrofit
    compile 'com.github.kirtan403.k4kotlin:k4kotlin-retrofit:0.5.4'
    // For all modules (NOT RECOMMENDED) - Below line will include all the above dependencies
    compile 'com.github.kirtan403:K4Kotlin:0.5.4'

NOTE: Upgrading from < 0.3.0

If you are upgrading from 0.1.x or 0.2.x to > 0.3.0, you might need to change the dependency in your build.gradle file.

From 0.3.0, library modules are divided into multiple specific modules. So if you will not change the dependency package, then you might unnecessary adding recurring dependencies you might not need. So

For including your basic functionality, you should change from

// from
compile 'com.github.kirtan403:K4Kotlin:0.2.x'
// to 
compile 'com.github.kirtan403.k4kotlin:k4kotlin:0.3.0'

Then, additionally you can add as many other modules you might need.

Usage / Documentaion

Check out the wiki for detailed documentation and usage examples.

For k4kotlin core module click here For k4kotlin-retrofit module's documentation, click here