Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cbc83b34
authored
Mar 05, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新gradle版本
parent
a40aa31b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
app/src/main/java/com/bgycc/smartcanteen/App.kt
+12
-5
build.gradle
+5
-5
gradle/wrapper/gradle-wrapper.properties
+1
-1
No files found.
app/src/main/java/com/bgycc/smartcanteen/App.kt
View file @
cbc83b34
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
build.gradle
View file @
cbc83b34
...
...
@@ -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
()
}
}
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
cbc83b34
...
...
@@ -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
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