Commit cbc83b34 by pye52

更新gradle版本

parent a40aa31b
package com.bgycc.smartcanteen
import android.Manifest
import android.app.ActivityManager
import android.app.Application
import android.content.Context
......@@ -10,18 +9,20 @@ import com.bgycc.smartcanteen.helper.TTSHelper
import com.bgycc.smartcanteen.helper.TimerHelper
import com.bgycc.smartcanteen.helper.WifiHelpler
import com.bgycc.smartcanteen.manager.NetworkManager
import com.bgycc.smartcanteen.util.LogUtil
import com.bgycc.smartcanteen.module.Device
import com.bgycc.smartcanteen.util.LogUtil
import com.blankj.utilcode.constant.PermissionConstants
import com.blankj.utilcode.util.CrashUtils
import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.PermissionUtils
import java.lang.Exception
import java.io.File
import kotlin.system.exitProcess
class App : Application() {
companion object {
private lateinit var sDefault: App
private const val LOG_DIR = "log"
private val sInstances = HashMap<String, App>()
private var sVersionName = "0.0.0"
private var sVersionCode = 0
......@@ -96,7 +97,12 @@ class App : Application() {
private fun initLog() {
LogUtil.setEnable(BuildConfig.DEBUG)
val config = LogUtils.getConfig()
config.saveDays = 7
val logDir: String = applicationContext.filesDir.absolutePath + File.separator + LOG_DIR
CrashUtils.init(logDir)
LogUtils.getConfig()
.setDir(logDir)
.setLog2FileSwitch(true)
.setBorderSwitch(false)
.saveDays = 7
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
......@@ -17,8 +17,8 @@ buildscript {
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
jcenter()
google()
}
}
......
......@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
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