Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
33fe602c
Commit
33fe602c
authored
May 31, 2022
by
赵鹏翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e373d759
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
build.gradle
app/build.gradle
+2
-8
MiyaApplication.kt
app/src/main/java/com/miya/fastcashier/MiyaApplication.kt
+1
-6
ApiRequest.kt
app/src/main/java/com/miya/fastcashier/net/ApiRequest.kt
+2
-1
build.gradle
lib_common/build.gradle
+11
-1
BaseApplication.kt
...c/main/java/com/fastcashier/lib_common/BaseApplication.kt
+2
-2
No files found.
app/build.gradle
View file @
33fe602c
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
()
{
...
...
app/src/main/java/com/miya/fastcashier/MiyaApplication.kt
View file @
33fe602c
...
...
@@ -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
:
MultiDex
Application
()
{
class
MiyaApplication
:
Base
Application
()
{
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
...
...
app/src/main/java/com/miya/fastcashier/net/ApiRequest.kt
View file @
33fe602c
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
(
Miya
Application
.
getApplication
(),
it
)
LogFileUtils
.
writeLog
(
Base
Application
.
getApplication
(),
it
)
}
}.
apply
{
level
=
MiyaHttpLoggingInterceptor
.
Level
.
BODY
}
...
...
lib_common/build.gradle
View file @
33fe602c
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
lib_common/src/main/java/com/fastcashier/lib_common/BaseApplication.kt
View file @
33fe602c
package
com.fastcashier.lib_common
import
android
.app.
Application
import
android
x.multidex.MultiDex
Application
abstract
class
BaseApplication
:
Application
()
{
open
class
BaseApplication
:
MultiDex
Application
()
{
companion
object
{
private
lateinit
var
instance
:
BaseApplication
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment