This repository was archived by the owner on Jul 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +24
-1
lines changed
src/main/kotlin/io/goooler/demoapp/common Expand file tree Collapse file tree 7 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 4040- [x] [ Retrofit] ( https://github.com/square/retrofit/releases )
4141- [x] [ Moshi] ( https://github.com/square/moshi/releases )
4242- [x] [ LeakCanary] ( https://github.com/square/leakcanary/releases )
43+ - [x] [ DoraemonKit] ( https://github.com/didi/DoraemonKit/releases )
4344- [x] [ Coil] ( https://github.com/coil-kt/coil/releases )
4445- [x] [ Glide] ( https://github.com/bumptech/glide/releases )
4546- [x] [ ARouter] ( https://github.com/alibaba/ARouter/releases )
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ private const val collectionVersion = "1.1.0"
5858private const val bintrayPublishVersion = " 1.0.0"
5959private const val browserVersion = " 1.3.0"
6060private const val webKitVersion = " 1.4.0"
61+ private const val doraemonKitVersion = " 3.3.5"
6162const val dependencyUpdateVersion = " 0.36.0"
6263const val kotlinterVersion = " 3.3.0"
6364
@@ -120,6 +121,7 @@ object Libs {
120121 const val permissionX = " com.permissionx.guolindev:permissionx:$permissionXVersion "
121122 const val browser = " androidx.browser:browser:$browserVersion "
122123 const val webKit = " androidx.webkit:webkit:$webKitVersion "
124+ const val doraemonKit = " com.didichuxing.doraemonkit:dokitx:$doraemonKitVersion "
123125
124126 const val protobufPlugin = " com.google.protobuf:protobuf-gradle-plugin:$protobufVersion "
125127 const val arouterPlugin = " com.alibaba:arouter-register:$arouterRegisterVersion "
Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ fun DependencyHandler.implementation(vararg names: Any): Array<Dependency?> =
6565 add(" implementation" , it)
6666 }.toTypedArray()
6767
68+ fun DependencyHandler.debugImplementation (vararg names : Any ): Array <Dependency ?> =
69+ names.map {
70+ add(" debugImplementation" , it)
71+ }.toTypedArray()
72+
6873fun DependencyHandler.kapt (vararg names : Any ): Array <Dependency ?> =
6974 names.map {
7075 add(" kapt" , it)
@@ -209,7 +214,6 @@ fun Project.setupApp(
209214 compileOptions.isCoreLibraryDesugaringEnabled = true
210215 dependencies.run {
211216 add(" coreLibraryDesugaring" , Libs .desugar)
212- add(" debugImplementation" , Libs .leakCanary)
213217 }
214218 block()
215219 }
Original file line number Diff line number Diff line change @@ -7,4 +7,8 @@ dependencies {
77 Libs .okHttpLogInterceptor,
88 Libs .okHttpBrotliInterceptor
99 )
10+ debugImplementation(
11+ Libs .leakCanary,
12+ Libs .doraemonKit
13+ )
1014}
Original file line number Diff line number Diff line change 11package io.goooler.demoapp.common
22
33import com.alibaba.android.arouter.launcher.ARouter
4+ import com.didichuxing.doraemonkit.DoraemonKit
45import com.scwang.smart.refresh.footer.ClassicsFooter
56import com.scwang.smart.refresh.header.ClassicsHeader
67import com.scwang.smart.refresh.layout.SmartRefreshLayout
78import io.goooler.demoapp.base.core.BaseApplication
9+ import io.goooler.demoapp.common.type.CommonConstants
810import io.goooler.demoapp.common.util.CrashHandler
911import io.goooler.demoapp.common.util.debugRun
1012
@@ -15,6 +17,7 @@ abstract class CommonApplication : BaseApplication() {
1517 CrashHandler .init ()
1618 initArouter()
1719 initSmartRefresh()
20+ initDoKit()
1821 }
1922
2023 private fun initArouter () {
@@ -25,6 +28,10 @@ abstract class CommonApplication : BaseApplication() {
2528 ARouter .init (this )
2629 }
2730
31+ private fun initDoKit () {
32+ DoraemonKit .install(this , CommonConstants .DORAEMON_KIT_KEY )
33+ }
34+
2835 private fun initSmartRefresh () {
2936 SmartRefreshLayout .setDefaultRefreshHeaderCreator { context, refreshLayout ->
3037 refreshLayout.setPrimaryColorsId(
Original file line number Diff line number Diff line change 1+ @file:Suppress(" SpellCheckingInspection" )
2+
13package io.goooler.demoapp.common.type
24
35object CommonConstants {
6+ internal const val DORAEMON_KIT_KEY = " 4a8c3eef29f029bc197705faad83f43d"
7+
48 const val DEFAULT_PAGE_SIZE = 20
59
610 object RequestFields {
You can’t perform that action at this time.
0 commit comments