Skip to content

Commit 47d6966

Browse files
author
zhouxingrong
committed
fix code
1 parent 40edf78 commit 47d6966

File tree

8 files changed

+26
-61
lines changed

8 files changed

+26
-61
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ dependencies {
132132
androidTestCompile('com.android.support:multidex-instrumentation:1.0.1') {
133133
exclude group: 'com.android.support', module: 'multidex'
134134
}
135-
// compile project(':toolslibrary')
136-
compile rootProject.ext.dependencies.androidtools
135+
compile project(':toolslibrary')
136+
// compile rootProject.ext.dependencies.androidtools
137137

138138
testCompile rootProject.ext.dependencies.junit
139139
//View the App database usage (method: 1. release comment. 2. recompile. 3. use the'DebugDB'field to retrieve log. 4. and access the retrieved connection. OK)

app/src/androidTest/java/com/jusenr/tools/ExampleInstrumentedTest.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/src/main/java/com/jusenr/tools/TotalApplication.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.app.Application;
44
import android.content.pm.ApplicationInfo;
5-
import android.support.multidex.MultiDex;
65

76
import com.jusenr.tools.api.BaseApi;
87
import com.jusenr.toolslibrary.AndroidTools;
@@ -26,9 +25,6 @@ public class TotalApplication extends Application {
2625
public void onCreate() {
2726
super.onCreate();
2827

29-
//MultiDex initialization
30-
MultiDex.install(getApplicationContext());
31-
3228
//API initialise.
3329
BaseApi.init();
3430

app/src/test/java/com/jusenr/tools/ExampleUnitTest.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ ext {
1212

1313
androids = [
1414
compileSdkVersion : 26,
15-
buildToolsVersion : "26.0.0",
15+
buildToolsVersion : "26.0.1",
1616
minSdkVersion : 15,
1717
targetSdkVersion : 26,
1818
versionCode : 12,
19-
versionName : "1.3.2",
19+
versionName : PROJ_VERSION,
2020
applicationId : "com.jusenr.tools",
2121
manifestPlaceholders: [UMENG_APPKEY_VALUE: "59a1173a7f2c747ef20009a3",
2222
APP_ID : "6666"],
@@ -26,7 +26,7 @@ ext {
2626
junitVersion : "4.12",
2727
debugDbVersion : "1.0.0",
2828
leakcanaryVersion : "1.5.1",
29-
androidtoolsVersion : "1.+",
29+
androidtoolsVersion : PROJ_VERSION,
3030

3131
constraintVersion : "1.0.2",
3232
androidSupportVersion: "26.+",

toolslibrary/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ group = 'com.github.Jusenr'
55

66
android {
77
compileSdkVersion 26
8-
buildToolsVersion "26.0.0"
8+
buildToolsVersion "26.0.1"
99

1010
defaultConfig {
1111
minSdkVersion 15
1212
targetSdkVersion 26
1313
versionCode 1
1414
versionName "1.0.0"
1515

16+
multiDexEnabled true
17+
renderscriptTargetApi 26
18+
renderscriptSupportModeEnabled true
1619
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1720
}
1821
buildTypes {
@@ -40,6 +43,8 @@ dependencies {
4043
compile 'com.google.zxing:core:3.3.0'
4144
compile 'org.simple:androideventbus:1.0.5.1'
4245

46+
compile 'com.android.support:multidex:1.0.1'
47+
4348
}
4449

4550
apply from: "$rootDir/bintray.gradle"

toolslibrary/src/main/java/com/jusenr/toolslibrary/AndroidTools.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.content.Context;
44
import android.support.annotation.NonNull;
5+
import android.support.multidex.MultiDex;
56

67
import com.jusenr.toolslibrary.log.logger.FormatStrategy;
78
import com.jusenr.toolslibrary.log.logger.Logger;
@@ -19,7 +20,20 @@
1920
*/
2021
public final class AndroidTools {
2122

23+
private AndroidTools() {
24+
throw new AssertionError();
25+
}
26+
27+
public static void init(@NonNull Context context, @NonNull String logtag) {
28+
FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
29+
.tag(logtag)
30+
.build();
31+
init(context, formatStrategy, Logger.VERBOSE);
32+
}
33+
2234
public static void init(@NonNull Context context, @NonNull FormatStrategy formatStrategy, int logLevel) {
35+
//MultiDex initialization
36+
MultiDex.install(context);
2337
//Preference file initialization.
2438
PreferenceUtils.init(context);
2539
//AndroidTools initialise.
@@ -33,11 +47,4 @@ public static void init(@NonNull Context context, @NonNull FormatStrategy format
3347
// .build();
3448
Logger.init(context, formatStrategy, logLevel);
3549
}
36-
37-
public static void init(@NonNull Context context, @NonNull String logtag) {
38-
FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
39-
.tag(logtag)
40-
.build();
41-
init(context, formatStrategy, Logger.VERBOSE);
42-
}
4350
}

0 commit comments

Comments
 (0)