This repository was archived by the owner on Jul 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +16
-6
lines changed
src/main/kotlin/io/goooler/demoapp/common Expand file tree Collapse file tree 6 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ object Libs {
121121 const val permissionX = " com.permissionx.guolindev:permissionx:$permissionXVersion "
122122 const val browser = " androidx.browser:browser:$browserVersion "
123123 const val webKit = " androidx.webkit:webkit:$webKitVersion "
124- const val doraemonKit = " com.didichuxing.doraemonkit:dokitx:$doraemonKitVersion "
124+ const val doraemonKitDebug = " com.didichuxing.doraemonkit:dokitx:$doraemonKitVersion "
125+ const val doraemonKitRelease = " com.didichuxing.doraemonkit:dokitx-no-op:$doraemonKitVersion "
125126
126127 const val protobufPlugin = " com.google.protobuf:protobuf-gradle-plugin:$protobufVersion "
127128 const val arouterPlugin = " com.alibaba:arouter-register:$arouterRegisterVersion "
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ enum class BuildConfigField(val tag: String) {
2323 VersionCode (" VERSION_CODE" ),
2424 VersionName (" VERSION_NAME" ),
2525 CdnPrefix (" CDN_PREFIX" ),
26- ApiHost (" API_HOST" )
26+ ApiHost (" API_HOST" ),
27+ DoraemonKitKey (" DORAEMON_KIT_KEY" )
2728}
2829
2930enum class GradleTask (val task : String ) {
Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ fun DependencyHandler.debugImplementation(vararg names: Any): Array<Dependency?>
7070 add(" debugImplementation" , it)
7171 }.toTypedArray()
7272
73+ fun DependencyHandler.releaseImplementation (vararg names : Any ): Array <Dependency ?> =
74+ names.map {
75+ add(" releaseImplementation" , it)
76+ }.toTypedArray()
77+
7378fun DependencyHandler.kapt (vararg names : Any ): Array <Dependency ?> =
7479 names.map {
7580 add(" kapt" , it)
@@ -231,6 +236,10 @@ private fun Project.setupCommon(module: Module? = null): BaseExtension {
231236 putBuildConfigStringField(BuildConfigField .VersionName .tag, globalVersionName)
232237 putBuildConfigStringField(BuildConfigField .CdnPrefix .tag, cdnPrefix)
233238 putBuildConfigStringField(BuildConfigField .ApiHost .tag, apiHosts[name])
239+ putBuildConfigStringField(
240+ BuildConfigField .DoraemonKitKey .tag,
241+ " 4a8c3eef29f029bc197705faad83f43d"
242+ )
234243 }
235244 }
236245 }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ dependencies {
99 )
1010 debugImplementation(
1111 Libs .leakCanary,
12- Libs .doraemonKit
12+ Libs .doraemonKitDebug
1313 )
14+ releaseImplementation(Libs .doraemonKitRelease)
1415}
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import com.scwang.smart.refresh.footer.ClassicsFooter
66import com.scwang.smart.refresh.header.ClassicsHeader
77import com.scwang.smart.refresh.layout.SmartRefreshLayout
88import io.goooler.demoapp.base.core.BaseApplication
9- import io.goooler.demoapp.common.type.CommonConstants
109import io.goooler.demoapp.common.util.CrashHandler
1110import io.goooler.demoapp.common.util.debugRun
1211
@@ -29,7 +28,7 @@ abstract class CommonApplication : BaseApplication() {
2928 }
3029
3130 private fun initDoKit () {
32- DoraemonKit .install(this , CommonConstants .DORAEMON_KIT_KEY )
31+ DoraemonKit .install(this , BuildConfig .DORAEMON_KIT_KEY )
3332 }
3433
3534 private fun initSmartRefresh () {
Original file line number Diff line number Diff line change 33package io.goooler.demoapp.common.type
44
55object CommonConstants {
6- internal const val DORAEMON_KIT_KEY = " 4a8c3eef29f029bc197705faad83f43d"
76
87 const val DEFAULT_PAGE_SIZE = 20
98
You can’t perform that action at this time.
0 commit comments