• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

kirtan403/K4Kotlin: A sweet, small set of Kotlin functions to reduce your androi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

kirtan403/K4Kotlin

开源软件地址(OpenSource Url):

https://github.com/kirtan403/K4Kotlin

开源编程语言(OpenSource Language):

Kotlin 94.5%

开源软件介绍(OpenSource Introduction):

K4Kotlin Release

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

Dependency

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-core:1.0.0-beta1'
    
    // K4Kotlin androidx extension functions (Uses appcompat version of androidx)
    compile 'com.github.kirtan403.k4kotlin:k4kotlin-androidx:1.0.0-beta1'
    
    // K4Kotlin databinding extension functions
    compile 'com.github.kirtan403.k4kotlin:k4kotlin-databinding:1.0.0-beta1'
    
    // K4Koltin Extensions for Retrofit
    compile 'com.github.kirtan403.k4kotlin:k4kotlin-retrofit:1.0.0-beta1'
}

Upgrade Notes

Upgrading to 1.0.0-beta1

All the functions have been divided into multiple dependencies. Now all functions that can directly be called without any androidx dependencies are part of the k4kotlin-core module. All the functions that requires one or more androidx component, are moved to k4kotlin-androidx module. Databinding related functions are moved to k4kotlin-databinding package. So you can just what is required for you without adding unnecessary components to your project. The full migration guide will be published with changes when 1.0.0 hits stable.

Upgrading from < 0.3.0 to < 1.0.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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap