Skip to content

Commit 3499aea

Browse files
authored
Merge pull request CymChad#1677 from AllenCoder/master
upgrade android studio plugin 3.0.0 and Compatible with sdk 26
2 parents dde7464 + 7a68360 commit 3499aea

File tree

4 files changed

+25
-30
lines changed

4 files changed

+25
-30
lines changed

app/build.gradle

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion '25.0.2'
4+
compileSdkVersion 26
65

76
defaultConfig {
87
applicationId "com.chad.baserecyclerviewadapterhelper"
98
minSdkVersion 14
10-
targetSdkVersion 25
9+
targetSdkVersion 26
1110
versionCode 5
1211
versionName "2.1"
1312
}
@@ -25,13 +24,13 @@ android {
2524
}
2625

2726
dependencies {
28-
compile fileTree(include: ['*.jar'], dir: 'libs')
29-
compile project(path: ':library')
30-
compile project(':material-spinner-1.0.5')
31-
compile 'com.github.bumptech.glide:glide:3.7.0'
32-
compile 'com.android.support:design:25.2.0'
33-
compile 'com.android.support:cardview-v7:25.2.0'
34-
compile 'com.android.support:appcompat-v7:25.2.0'
35-
compile 'com.kyleduo.switchbutton:library:1.4.4'
36-
compile 'com.orhanobut:logger:1.15'
27+
implementation fileTree(include: ['*.jar'], dir: 'libs')
28+
implementation project(path: ':library')
29+
implementation project(':material-spinner-1.0.5')
30+
implementation 'com.github.bumptech.glide:glide:3.7.0'
31+
implementation 'com.android.support:design:26.1.0'
32+
implementation 'com.android.support:cardview-v7:26.1.0'
33+
implementation 'com.android.support:appcompat-v7:26.1.0'
34+
implementation 'com.kyleduo.switchbutton:library:1.4.4'
35+
implementation 'com.orhanobut:logger:2.1.1'
3736
}

app/src/main/java/com/chad/baserecyclerviewadapterhelper/MyApplication.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import android.app.Application;
1818

1919
import com.chad.baserecyclerviewadapterhelper.util.Utils;
20-
import com.orhanobut.logger.LogLevel;
20+
import com.orhanobut.logger.AndroidLogAdapter;
2121
import com.orhanobut.logger.Logger;
2222

2323
/**
@@ -38,15 +38,10 @@ public static MyApplication getInstance() {
3838
@Override
3939
public void onCreate() {
4040
super.onCreate();
41-
appContext =this;
41+
appContext = this;
4242
Utils.init(this);
4343
if (BuildConfig.DEBUG) {
44-
Logger
45-
.init("BaseRecyclerViewAdapter") // default PRETTYLOGGER or use just init()
46-
.methodCount(3) // default 2
47-
.logLevel(LogLevel.FULL) // default LogLevel.FULL
48-
.methodOffset(2) // default 0
49-
; //default AndroidLogAdapter
44+
Logger.addLogAdapter(new AndroidLogAdapter());
5045

5146

5247
}

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
buildscript {
22
repositories {
33
jcenter()
4+
google()
45
mavenLocal()
56
mavenCentral()
67

78
}
89
dependencies {
9-
classpath 'com.android.tools.build:gradle:2.3.3'
10+
classpath 'com.android.tools.build:gradle:3.0.0'
1011
}
1112
}
1213

1314
allprojects {
14-
repositories {
15-
jcenter()
16-
mavenCentral()
17-
}
15+
repositories {
16+
jcenter()
17+
google()
18+
mavenCentral()
1819
}
20+
}
1921

2022

library/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
apply plugin: 'com.android.library'
22
android {
3-
compileSdkVersion 25
4-
buildToolsVersion "25.0.2"
3+
compileSdkVersion 26
54

65
defaultConfig {
76
minSdkVersion 11
8-
targetSdkVersion 23
7+
targetSdkVersion 26
98
versionCode 1
109
versionName "1.0"
1110
}
@@ -48,6 +47,6 @@ artifacts {
4847

4948
dependencies {
5049

51-
compile fileTree(include: ['*.jar'], dir: 'libs')
52-
provided 'com.android.support:recyclerview-v7:25.2.0'
50+
implementation fileTree(include: ['*.jar'], dir: 'libs')
51+
compileOnly 'com.android.support:recyclerview-v7:26.1.0'
5352
}

0 commit comments

Comments
 (0)