Commit 33fe602c authored by 赵鹏翔's avatar 赵鹏翔

update

parent e373d759
plugins { plugins {
id 'com.android.application' id 'com.android.application'
id 'kotlin-android' id 'kotlin-android'
id 'kotlin-kapt'
} }
apply from: '../versions.gradle' apply from: '../versions.gradle'
...@@ -72,22 +71,17 @@ dependencies { ...@@ -72,22 +71,17 @@ dependencies {
implementation 'com.rengwuxian.materialedittext:library:2.1.4' implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.github.GrenderG:Toasty:1.5.2' implementation 'com.github.GrenderG:Toasty:1.5.2'
kapt 'androidx.room:room-compiler:2.4.0'
implementation 'androidx.room:room-runtime:2.4.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation 'junit:junit:4.+' testImplementation 'junit:junit:4.+'
implementation 'com.alibaba:fastjson:1.2.8' implementation 'com.alibaba:fastjson:1.2.8'
implementation 'com.blankj:utilcode:1.30.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.tencent:mmkv:1.2.12'
implementation 'com.github.ybq:Android-SpinKit:1.4.0' implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'com.github.d-max:spots-dialog:1.1@aar' implementation 'com.github.d-max:spots-dialog:1.1@aar'
implementation 'com.elvishew:xlog:1.10.1' implementation 'com.elvishew:xlog:1.10.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
implementation 'com.contrarywind:Android-PickerView:4.1.9' implementation 'com.contrarywind:Android-PickerView:4.1.9'
implementation 'com.guolindev.permissionx:permissionx:1.6.1'
} }
static String buildTime() { static String buildTime() {
......
...@@ -2,7 +2,6 @@ package com.miya.fastcashier ...@@ -2,7 +2,6 @@ package com.miya.fastcashier
import android.app.Activity import android.app.Activity
import android.os.Bundle import android.os.Bundle
import androidx.multidex.MultiDexApplication
import com.blankj.utilcode.util.LogUtils import com.blankj.utilcode.util.LogUtils
import com.elvishew.xlog.LogConfiguration import com.elvishew.xlog.LogConfiguration
import com.elvishew.xlog.LogLevel import com.elvishew.xlog.LogLevel
...@@ -30,7 +29,7 @@ import java.io.File ...@@ -30,7 +29,7 @@ import java.io.File
import java.util.* import java.util.*
class MiyaApplication : MultiDexApplication() { class MiyaApplication : BaseApplication() {
companion object { companion object {
private lateinit var instance: MiyaApplication private lateinit var instance: MiyaApplication
...@@ -52,9 +51,7 @@ class MiyaApplication : MultiDexApplication() { ...@@ -52,9 +51,7 @@ class MiyaApplication : MultiDexApplication() {
} }
private fun logConfig() { private fun logConfig() {
XLog.init(LogLevel.ALL); XLog.init(LogLevel.ALL);
val config = LogConfiguration.Builder() val config = LogConfiguration.Builder()
.logLevel( .logLevel(
if (BuildConfig.DEBUG) LogLevel.ALL // 指定日志级别,低于该级别的日志将不会被打印,默认为 LogLevel.ALL if (BuildConfig.DEBUG) LogLevel.ALL // 指定日志级别,低于该级别的日志将不会被打印,默认为 LogLevel.ALL
...@@ -64,9 +61,7 @@ class MiyaApplication : MultiDexApplication() { ...@@ -64,9 +61,7 @@ class MiyaApplication : MultiDexApplication() {
.build() .build()
val androidPrinter: Printer = AndroidPrinter(true) // 通过 android.util.Log 打印日志的打印器 val androidPrinter: Printer = AndroidPrinter(true) // 通过 android.util.Log 打印日志的打印器
val consolePrinter: Printer = ConsolePrinter() // 通过 System.out 打印日志到控制台的打印器 val consolePrinter: Printer = ConsolePrinter() // 通过 System.out 打印日志到控制台的打印器
val filePrinter: Printer = FilePrinter.Builder( val filePrinter: Printer = FilePrinter.Builder(
applicationContext.getExternalFilesDir(null)!! applicationContext.getExternalFilesDir(null)!!
.absolutePath .absolutePath
......
package com.miya.fastcashier.net package com.miya.fastcashier.net
import android.util.Log import android.util.Log
import com.fastcashier.lib_common.BaseApplication
import com.fastcashier.lib_common.net.CommonCallback import com.fastcashier.lib_common.net.CommonCallback
import com.miya.fastcashier.MiyaApplication import com.miya.fastcashier.MiyaApplication
import com.miya.fastcashier.beans.LoginRequest import com.miya.fastcashier.beans.LoginRequest
...@@ -35,7 +36,7 @@ class ApiRequest private constructor() { ...@@ -35,7 +36,7 @@ class ApiRequest private constructor() {
MiyaHttpLoggingInterceptor { MiyaHttpLoggingInterceptor {
Log.e("####", it) Log.e("####", it)
if (!LogFileUtils.isProhibitWrite) { if (!LogFileUtils.isProhibitWrite) {
LogFileUtils.writeLog(MiyaApplication.getApplication(),it) LogFileUtils.writeLog(BaseApplication.getApplication(),it)
} }
}.apply { level = MiyaHttpLoggingInterceptor.Level.BODY } }.apply { level = MiyaHttpLoggingInterceptor.Level.BODY }
......
plugins { plugins {
id 'com.android.library' id 'com.android.library'
id 'kotlin-android' id 'kotlin-android'
id 'kotlin-kapt'
} }
android { android {
...@@ -11,7 +12,7 @@ android { ...@@ -11,7 +12,7 @@ android {
targetSdkVersion 31 targetSdkVersion 31
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
multiDexEnabled true
consumerProguardFiles "consumer-rules.pro" consumerProguardFiles "consumer-rules.pro"
buildConfigField 'String', "CHANNEL", "\"$CHANNEL\"" buildConfigField 'String', "CHANNEL", "\"$CHANNEL\""
...@@ -55,4 +56,13 @@ dependencies { ...@@ -55,4 +56,13 @@ dependencies {
exclude group: 'stax', module: 'stax-api' exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax' exclude group: 'stax', module: 'stax'
} }
api 'com.tencent:mmkv:1.2.12'
api 'com.guolindev.permissionx:permissionx:1.6.1'
debugApi 'com.squareup.leakcanary:leakcanary-android:2.7'
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
kapt 'androidx.room:room-compiler:2.4.0'
api 'androidx.room:room-runtime:2.4.0'
api 'com.blankj:utilcode:1.30.0'
api 'androidx.multidex:multidex:2.0.0@aar'
} }
\ No newline at end of file
package com.fastcashier.lib_common package com.fastcashier.lib_common
import android.app.Application import androidx.multidex.MultiDexApplication
abstract class BaseApplication : Application() { open class BaseApplication : MultiDexApplication() {
companion object { companion object {
private lateinit var instance: BaseApplication private lateinit var instance: BaseApplication
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment