class Repository { Map androidLibraries Map kotlinLibraries Map thirdLibraries Map uiLibraries Map debugLibraries Map testLibraries } ext { newRepository = this.&innerNewRepository } static Repository innerNewRepository() { def androidLibrariesVersion = "28.0.0" def android_plugin_version = '3.1.4' def androidLibraries = [ //https://developer.android.com/topic/libraries/support-library/features.html androidCompatV4 : "com.android.support:support-v4:${androidLibrariesVersion}",//v4 all androidCompatV7 : "com.android.support:appcompat-v7:${androidLibrariesVersion}", androidCompatV13 : "com.android.support:support-v13:${androidLibrariesVersion}", androidDesign : "com.android.support:design:${androidLibrariesVersion}", androidPrecent : "com.android.support:percent:${androidLibrariesVersion}", androidAnnotations : "com.android.support:support-annotations:${androidLibrariesVersion}", androidCard : "com.android.support:cardview-v7:${androidLibrariesVersion}", androidRecyclerView : "com.android.support:recyclerview-v7:${androidLibrariesVersion}", transition : "com.android.support:transition:${androidLibrariesVersion}", androidExif : "com.android.support:exifinterface:${androidLibrariesVersion}", gridlayout : "com.android.support:gridlayout-v7:${androidLibrariesVersion}", dynamicAnimation : "com.android.support:support-dynamic-animation:${androidLibrariesVersion}", constraintLayout : 'com.android.support.constraint:constraint-layout:1.1.3', multiDex : "com.android.support:multidex:1.0.2", dataBinding : "com.android.databinding:compiler:${android_plugin_version}", //lifecycle lifecycle : "android.arch.lifecycle:runtime:1.1.1",//not necessary if you are using lifecycle:extensions or lifecycle:common-java8 lifecycleAPT : "android.arch.lifecycle:compiler:1.1.1",// not needed if you are using the DefaultLifecycleObserver from common-java8 artifact. lifecycleJava8 : "android.arch.lifecycle:common-java8:1.1.1", //LiveData, and ViewModel lifecycleExtensions : "android.arch.lifecycle:extensions:1.1.1",//For LiveData, and ViewModel liveDataReactiveStreams: "android.arch.lifecycle:reactivestreams:1.1.1",//To use LiveData with ReactiveStreams API //room room : "android.arch.persistence.room:runtime:1.0.0", roomApt : "android.arch.persistence.room:compiler:1.0.0", roomRxJava2 : "android.arch.persistence.room:rxjava2:1.0.0", roomGuava : "android.arch.persistence.room:guava:1.1.0-beta3", //paging paging : "android.arch.paging:runtime:1.0.0", //https://github.com/google/flexbox-layout/ flexbox : 'com.google.android:flexbox:1.0.0', ] def anko_version = '0.10.7' def kotlin_version = '1.3.41' def kotlinLibraries = [ //Kotlin kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version", kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version", kotlinCoroutines : 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0',//协程库 kotlinAndroidCoroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0", //https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter retrofitKotlinAdapter : 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-experimental-adapter:1.0.0', //https://github.com/android/android-ktx:android_ktx: A set of Kotlin extensions for Android app development //https://android.github.io/android-ktx/core-ktx/index.html androidKTX : 'androidx.core:core-ktx:1.0.0', //https://github.com/ReactiveX/RxKotlin rxKotlin : 'io.reactivex.rxjava2:rxkotlin:2.2.0', //https://github.com/enbandari/KotlinTuples tuples : "com.bennyhuo.kotlin:kotlin-tuples:1.0", //https://github.com/enbandari/ObjectPropertyDelegate objectPropertyDelegate : "com.bennyhuo.kotlin:opd:1.0-rc-2", //https://github.com/enbandari/KotlinDeepCopy deepCopyReflect : "com.bennyhuo.kotlin:deepcopy-reflect:1.0", deepCopy : "com.bennyhuo.kotlin:deepcopy-annotations:1.1.0", deepCopyApt : "com.bennyhuo.kotlin:deepcopy-compiler:1.1.0", //https://github.com/enbandari/ReleasableVar releasableVar : "com.bennyhuo.kotlin:releasable-nonnull-vars:1.1.0", //kotlin functional, https://arrow-kt.io/ arrowCore : "io.arrow-kt:arrow-core:0.8.2", //============================================================================ //Anko //============================================================================ // Anko https://github.com/Kotlin/anko ankoAll : "org.jetbrains.anko:anko:${anko_version}", ankoCommons : "org.jetbrains.anko:anko-commons:$anko_version",// Anko Commons ankoCommonsV4 : "org.jetbrains.anko:anko-support-v4-commons:$anko_version", ankoCommonsV7 : "org.jetbrains.anko:anko-appcompat-v7-commons:$anko_version", ankoSQLite : "org.jetbrains.anko:anko-sqlite:$anko_version", // Anko SQLite // Anko Layouts , sdk15, sdk19, sdk21, sdk23 are also available, 只需要依赖一个sdk ankoLayoutSDK : "org.jetbrains.anko:anko-sdk27:$anko_version", ankoLayoutCompatV7 : "org.jetbrains.anko:anko-appcompat-v7:$anko_version", ankoLayoutCompatV4 : "org.jetbrains.anko:anko-support-v4:$anko_version", ankoLayoutDesign : "org.jetbrains.anko:anko-design:$anko_version", ankoLayoutRecyclerView : "org.jetbrains.anko:anko-recyclerview-v7:$anko_version", ankoLayoutCardView : "org.jetbrains.anko:anko-cardview-v7:$anko_version", ankoLayoutGridLayout : "org.jetbrains.anko:anko-gridlayout-v7:$anko_version", ankoLayoutPercent : "org.jetbrains.anko:anko-percent:$anko_version", ankoCoroutines : "org.jetbrains.anko:anko-coroutines:$anko_version", //anko Coroutines ankoLayoutCoroutine : "org.jetbrains.anko:anko-sdk25-coroutines:$anko_version", //Anko Layouts Coroutine listeners ankoLayoutCompatV7Coroutine: "org.jetbrains.anko:anko-appcompat-v7-coroutines:$anko_version", ankoDesignCoroutine : "org.jetbrains.anko:anko-design-coroutines:$anko_version", ankoRecyclerViewCoroutines : "org.jetbrains.anko:anko-recyclerview-v7-coroutines:$anko_version" ] def rxBindingVersion = '2.1.1' def autoDisposeVersion = '1.0.0-RC3' def retrofitVersion = '2.5.0' def daggerVersion = "2.17" def thirdLibraries = [ //============================================================================ //RxJava //============================================================================ //https://github.com/ReactiveX/RxJava rxJava : "io.reactivex.rxjava2:rxjava:2.2.9", //https://github.com/ReactiveX/RxAndroid rxAndroid : 'io.reactivex.rxjava2:rxandroid:2.1.1', //https://github.com/JakeWharton/RxBinding rxBinding : "com.jakewharton.rxbinding2:rxbinding:$rxBindingVersion", rxBindingV4 : "com.jakewharton.rxbinding2:rxbinding-support-v4:$rxBindingVersion", rxBindingCompat : "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:$rxBindingVersion", rxBindingDesign : "com.jakewharton.rxbinding2:rxbinding-design:$rxBindingVersion", rxBindingRecyclerView : "com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:$rxBindingVersion", //https://github.com/uber/AutoDispose autoDispose : "com.uber.autodispose:autodispose:$autoDisposeVersion", autoDisposeLifecycleJDK8 : "com.uber.autodispose:autodispose-lifecycle-jdk8:$autoDisposeVersion", autoDisposeLifecycleArchcomponents: "com.uber.autodispose:autodispose-android-archcomponents:$autoDisposeVersion", //https://github.com/uber/RxDogTag rxDogTag : "com.uber.rxdogtag:rxdogtag:0.1.0", //RxReplay https://github.com/JakeWharton/RxRelay rxReplay : 'com.jakewharton.rxrelay2:rxrelay:2.0.0', //============================================================================ //OkHttp&Retrofit&Gson&Glide //============================================================================ //https://github.com/square/okhttp & https://github.com/square/retrofit okHttp : "com.squareup.okhttp3:okhttp:3.12.0", okHttpLogging : "com.squareup.okhttp3:logging-interceptor:3.12.0", retrofit : "com.squareup.retrofit2:retrofit:${retrofitVersion}", retrofitConverterGson : "com.squareup.retrofit2:converter-gson:${retrofitVersion}", retrofitRxJavaCallAdapter : "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}", retrofitRxJava2CallAdapter : "com.squareup.retrofit2:adapter-rxjava2:${retrofitVersion}", ////https://github.com/google/gson/blob/master/UserGuide.md#TOC-Overview gson : "com.google.code.gson:gson:2.8.5", //https://github.com/bumptech/glide glide : "com.github.bumptech.glide:glide:4.8.0", glideApt : 'com.github.bumptech.glide:compiler:4.8.0', glideOkHttp : 'com.github.bumptech.glide:okhttp3-integration:4.8.0', //============================================================================ //DI //============================================================================ //https://github.com/google/dagger dagger2 : "com.google.dagger:dagger:$daggerVersion", dagger2Android : "com.google.dagger:dagger-android:$daggerVersion", dagger2AndroidSupport : "com.google.dagger:dagger-android-support:$daggerVersion", dagger2Apt : "com.google.dagger:dagger-compiler:$daggerVersion", dagger2AndroidApt : "com.google.dagger:dagger-android-processor:$daggerVersion", jsr305 : 'com.google.code.findbugs:jsr305:2.0.1', //============================================================================ //ARouter //============================================================================ //https://github.com/alibaba/ARouter,注意:apt arouter 应该放在 apt dagger 后面 arouter : 'com.alibaba:arouter-api:1.4.1', arouterAnnotation : 'com.alibaba:arouter-compiler:1.2.2', //============================================================================ //AOP //============================================================================ /*aspectJrt*/ aspectj : 'org.aspectj:aspectjrt:1.8.9', //https://eclipse.org/aspectj/ //============================================================================ //Utils //============================================================================ //kv存储:https://github.com/tencent/mmkv、https://mp.weixin.qq.com/s/kTr1GVDCAhs5K7Hq3322FA mmkv : 'com.tencent:mmkv:1.0.17', //https://github.com/dmstocking/support-optional supportOptional : 'com.github.dmstocking:support-optional:1.2', //日志:https://github.com/JakeWharton/timber timber : "com.jakewharton.timber:timber:4.5.1", //发射工具:https://github.com/jOOQ/jOOR jOOR : "org.jooq:joor-java-6:0.9.7", //https://github.com/Blankj/AndroidUtilCode utilcode : 'com.blankj:utilcode:1.23.7', //https://github.com/yanzhenjie/AndPermission andPermission : 'com.yanzhenjie.permission:support:2.0.1', //image compression:https://github.com/Sunzxyong/Tiny tiny : 'com.zxy.android:tiny:1.1.0', //zip4j zip4j : 'net.lingala.zip4j:zip4j:1.3.2', //JobScheduler:https://github.com/evernote/android-job androidJob : 'com.evernote:android-job:1.2.0', //VideoCache:/https://github.com/danikula/AndroidVideoCache videoCache : 'com.danikula:videocache:2.7.0', //https://github.com/promeG/TinyPinyin tinypinyin : 'com.github.promeg:tinypinyin:2.0.3', //多渠道:https://github.com/Tencent/VasDolly vasDolly : 'com.leon.channel:helper:2.0.3', //Android P 反射限制:https://github.com/tiann/FreeReflection freeReflection : 'me.weishu:free_reflection:1.2.0' ] def debugLibraries = [ //https://github.com/square/leakcanary debugLeakCanary : "com.squareup.leakcanary:leakcanary-android:1.6.3", debugLeakCanaryFragment: "com.squareup.leakcanary:leakcanary-support-fragment:1.6.3", releaseLeakCanary : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.3", //https://github.com/markzhai/AndroidPerformanceMonitor 卡顿监控 //http://blog.zhaiyifan.cn/2016/01/16/BlockCanaryTransparentPerformanceMonitor/ debugBlockCanary : "com.github.markzhai:blockcanary-android:1.4.0", releaseBlockCanary : "com.github.markzhai:blockcanary-no-op:1.4.0", //http://facebook.github.io/stetho/ 各种调试工具 stetho : 'com.facebook.stetho:stetho:1.4.2', stethoOkhttp3 : 'com.facebook.stetho:stetho-okhttp3:1.4.2', //https://github.com/eleme/UETool ui调试工具 ueTool : 'me.ele:uetool:1.2.1', //https://github.com/Kyson/AndroidGodEye 全面的调试工具 godeyeCore : 'cn.hikyson.godeye:godeye-core:2.1.1', godeyeMonitor : 'cn.hikyson.godeye:godeye-monitor:2.1.1', godeyeToolbox : 'cn.hikyson.godeye:godeye-toolbox:2.1.1', ] def uiLibraries = [ //qmui:https://qmuiteam.com/ qmui : 'com.qmuiteam:qmui:1.1.3', //https://github.com/GcsSloop/rclayout rclayout : 'com.gcssloop.widget:rclayout:1.6.0', /*adapter*/ //https://github.com/drakeet/MultiType multiType : 'me.drakeet.multitype:multitype:3.4.4', multiTypeKotlin : 'me.drakeet.multitype:multitype-kotlin:3.4.4', // https://github.com/Ztiany/WrapperAdapter wrapperAdapter : 'com.github.Ztiany:WrapperAdapter:3.0.7', /*image view about*/ //https://github.com/chrisbanes/PhotoView photoView : 'com.github.chrisbanes:PhotoView:2.1.3', rotatePhotoView :'com.chensl.rotatephotoview:rotatephotoview:1.0.5', //https://github.com/davemorrissey/subsampling-scale-image-view subsamplingScaleImageView: 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0', //https://github.com/hdodenhof/CircleImageView circleImageView : 'de.hdodenhof:circleimageview:2.1.0', //https://github.com/vinc3m1/RoundedImageView roundedImageView : 'com.makeramen:roundedimageview:2.3.0', //https://github.com/Piasy/BigImageViewer bigImageViewer : 'com.github.piasy:BigImageViewer:1.5.0', //https://github.com/Piasy/BigImageViewer bigImageViewerGlideLoader: 'com.github.piasy:GlideImageLoader:1.5.0', //https://github.com/iielse/ImageWatcher,高仿微信可拖拽返回 imageWatcher : 'com.github.iielse:ImageWatcher:1.1.1', //https://github.com/stfalcon-studio/StfalconImageViewer stfalconImageviewer : 'com.github.stfalcon:stfalcon-imageviewer:0.1.0', //https://github.com/gjiazhe/ScrollParallaxImageView scrollparallaximageview : 'com.gjiazhe:scrollparallaximageview:1.0', /*view pager about*/ //https://github.com/HuanHaiLiuXin/CoolViewPager coolviewpager : 'com.huanhailiuxin.view:coolviewpager:1.0.0', //https://github.com/geftimov/android-viewpager-transformers viewpagerTransformers : 'com.eftimoff:android-viewpager-transformers:1.0.1@aar', //https://github.com/ogaclejapan/SmartTabLayout smartTab : 'com.ogaclejapan.smarttablayout:library:1.6.1@aar', /*camera*/ //https://github.com/Fotoapparat/Fotoapparat fotoapparat : 'io.fotoapparat:fotoapparat:2.5.0', //https://github.com/CameraKit/camerakit-android cameraKit : 'com.camerakit:camerakit:1.0.0-beta3.10', //need kotlin and kotlinx-coroutines-android camerakitJpegkit : 'com.camerakit:jpegkit:0.1.0', //https://github.com/natario1/CameraView cameraView : 'com.otaliastudios:cameraview:1.3.1', //picker about //https://github.com/wdullaer/MaterialDateTimePicker materialTimePicker : 'com.wdullaer:materialdatetimepicker:3.6.4', //https://github.com/gzu-liyujiang/AndroidPicker androidWheelPicker : "com.github.gzu-liyujiang.AndroidPicker:WheelPicker:1.5.6", //https://github.com/zyyoona7/WheelPicker, it don't support setting max or min date. wheelWiewPicker : "com.github.zyyoona7:wheelview:1.0.5", /*text view*/ //https://github.com/chenBingX/SuperTextView superTextView : 'com.github.chenBingX:SuperTextView:v3.1.4', //https://github.com/iwgang/CountdownView countdownView : 'com.github.iwgang:countdownview:2.1.3', /*shape, tag*/ //https://github.com/florent37/ShapeOfView, need android x shapeOfView : 'com.github.florent37:shapeofview:1.4.5', //https://github.com/whilu/AndroidTagView androidtagView : 'co.lujun:androidtagview:1.0.6', //https://github.com/duanhong169/DrawableToolbox drawableToolbox : "com.github.duanhong169:drawabletoolbox:1.0.5", /*recycler view about*/ //https://github.com/GcsSloop/pager-layoutmanager pagerlayoutmanager : 'com.gcssloop.recyclerview:pagerlayoutmanager:2.3.2@aar', //https://github.com/alibaba/vlayout vlayout : 'com.alibaba.android:vlayout:1.0.4@aar', //https://github.com/DingMouRen/LayoutManagerGroup layoutManagerGroup : 'com.github.DingMouRen:LayoutManagerGroup:f68c9712e5', //https://github.com/lsjwzh/RecyclerViewPager recyclerViewPager : 'com.github.lsjwzh.RecyclerViewPager:lib:v1.1.2', //system ui manager:https://github.com/DreaminginCodeZH/SystemUiHelper systemUiHelper : 'me.zhanghai.android.systemuihelper:library:1.0.0', //soft input method:https://github.com/yshrsmz/KeyboardVisibilityEvent keyboardvisibilityevent : 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.0.0', ] def testLibraries = [ junit : "junit:junit:4.12", mockito: "org.mockito:mockito-core:1.10.19" ] def repository = new Repository() repository.androidLibraries = androidLibraries repository.kotlinLibraries = kotlinLibraries repository.thirdLibraries = thirdLibraries repository.debugLibraries = debugLibraries repository.uiLibraries = uiLibraries repository.testLibraries = testLibraries return repository }