Commit e5889123 by pye52

适配最新utilcode

parent 655e9bb0
......@@ -58,6 +58,10 @@ android {
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
......@@ -69,8 +73,8 @@ dependencies {
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.salomonbrys.kotson:kotson:2.5.0'
implementation 'com.blankj:utilcode:1.26.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.5'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.5'
implementation 'com.squareup.okhttp3:okhttp:3.12.10'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.10'
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:converter-scalars:2.7.1'
......
......@@ -46,7 +46,7 @@ object LogAction : Action(ActionEnum.LOG_PULL.name) {
val logZipFile = File(PathUtils.getExternalAppCachePath(), "upload/log.zip")
val logUploadDir = File(PathUtils.getExternalAppCachePath(), "upload/log")
FileUtils.delete(logZipFile)
FileUtils.deleteDir(logUploadDir)
FileUtils.delete(logUploadDir)
logUploadDir.mkdirs()
val logDir = when (type) {
......@@ -56,11 +56,11 @@ object LogAction : Action(ActionEnum.LOG_PULL.name) {
FileUtils.listFilesInDir(logDir)?.forEach {
val date = Date(it.lastModified())
if (date >= startTime && date <= endTime) {
FileUtils.copyFile(it, File(logUploadDir, it.name))
FileUtils.copy(it, File(logUploadDir, it.name))
}
}
ZipUtils.zipFile(logUploadDir, logZipFile)
FileUtils.deleteDir(logUploadDir)
FileUtils.delete(logUploadDir)
MainHttpClient.uploadLog(logZipFile, "$type${formatSrc.format(startTime)}${formatSrc.format(endTime)}${App.getDeviceSN()}.zip")
} catch (e: Exception) {}
state = State.INITED
......
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 sign in to comment