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

update

parent e373d759
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}
apply from: '../versions.gradle'
......@@ -72,22 +71,17 @@ dependencies {
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
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.+'
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.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.d-max:spots-dialog:1.1@aar'
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.guolindev.permissionx:permissionx:1.6.1'
}
static String buildTime() {
......
......@@ -2,7 +2,6 @@ package com.miya.fastcashier
import android.app.Activity
import android.os.Bundle
import androidx.multidex.MultiDexApplication
import com.blankj.utilcode.util.LogUtils
import com.elvishew.xlog.LogConfiguration
import com.elvishew.xlog.LogLevel
......@@ -30,7 +29,7 @@ import java.io.File
import java.util.*
class MiyaApplication : MultiDexApplication() {
class MiyaApplication : BaseApplication() {
companion object {
private lateinit var instance: MiyaApplication
......@@ -52,9 +51,7 @@ class MiyaApplication : MultiDexApplication() {
}
private fun logConfig() {
XLog.init(LogLevel.ALL);
val config = LogConfiguration.Builder()
.logLevel(
if (BuildConfig.DEBUG) LogLevel.ALL // 指定日志级别,低于该级别的日志将不会被打印,默认为 LogLevel.ALL
......@@ -64,9 +61,7 @@ class MiyaApplication : MultiDexApplication() {
.build()
val androidPrinter: Printer = AndroidPrinter(true) // 通过 android.util.Log 打印日志的打印器
val consolePrinter: Printer = ConsolePrinter() // 通过 System.out 打印日志到控制台的打印器
val filePrinter: Printer = FilePrinter.Builder(
applicationContext.getExternalFilesDir(null)!!
.absolutePath
......
package com.miya.fastcashier.net
import android.util.Log
import com.fastcashier.lib_common.BaseApplication
import com.fastcashier.lib_common.net.CommonCallback
import com.miya.fastcashier.MiyaApplication
import com.miya.fastcashier.beans.LoginRequest
......@@ -35,7 +36,7 @@ class ApiRequest private constructor() {
MiyaHttpLoggingInterceptor {
Log.e("####", it)
if (!LogFileUtils.isProhibitWrite) {
LogFileUtils.writeLog(MiyaApplication.getApplication(),it)
LogFileUtils.writeLog(BaseApplication.getApplication(),it)
}
}.apply { level = MiyaHttpLoggingInterceptor.Level.BODY }
......
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}
android {
......@@ -11,7 +12,7 @@ android {
targetSdkVersion 31
versionCode 1
versionName "1.0"
multiDexEnabled true
consumerProguardFiles "consumer-rules.pro"
buildConfigField 'String', "CHANNEL", "\"$CHANNEL\""
......@@ -55,4 +56,13 @@ dependencies {
exclude group: 'stax', module: 'stax-api'
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
import android.app.Application
import androidx.multidex.MultiDexApplication
abstract class BaseApplication : Application() {
open class BaseApplication : MultiDexApplication() {
companion object {
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