Skip to content

Commit 4b77b9d

Browse files
committed
gradle 升级
1 parent 2e86a03 commit 4b77b9d

6 files changed

Lines changed: 16 additions & 22 deletions

File tree

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 27
5-
buildToolsVersion '27.0.3'
65
defaultConfig {
76
applicationId "me.codego.example"
87
minSdkVersion 14

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
5+
mavenCentral()
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.3'
9+
classpath 'com.android.tools.build:gradle:4.2.2'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
11-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1211

1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files
@@ -17,7 +16,7 @@ buildscript {
1716

1817
allprojects {
1918
repositories {
20-
jcenter()
19+
mavenCentral()
2120
google()
2221
}
2322
}

dot-view/build.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
23

34
android {
4-
compileSdkVersion 27
5-
5+
compileSdkVersion 30
66

77
defaultConfig {
88
minSdkVersion 14
9-
targetSdkVersion 27
9+
targetSdkVersion 30
1010
versionCode 105
1111
versionName "1.0.5"
1212

@@ -25,11 +25,8 @@ android {
2525

2626
dependencies {
2727
implementation fileTree(dir: 'libs', include: ['*.jar'])
28-
implementation 'com.android.support:appcompat-v7:27.1.1'
29-
testImplementation 'junit:junit:4.12'
28+
testImplementation 'junit:junit:4.13.2'
3029
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
3130
exclude group: 'com.android.support', module: 'support-annotations'
3231
})
33-
}
34-
35-
apply from: "https://raw.githubusercontent.com/mengxn/android-library-publish-to-jcenter/master/bintrayUpload.gradle"
32+
}

dot-view/src/main/java/me/codego/view/DotLayout.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import android.graphics.Canvas;
66
import android.graphics.Color;
77
import android.graphics.Paint;
8-
import android.support.annotation.NonNull;
9-
import android.support.annotation.Nullable;
108
import android.util.AttributeSet;
119
import android.util.TypedValue;
1210
import android.view.View;
@@ -40,11 +38,11 @@ public class DotLayout extends FrameLayout {
4038
private static final int LOCATION_LEFT = 1;
4139

4240

43-
public DotLayout(@NonNull Context context) {
41+
public DotLayout(Context context) {
4442
this(context, null);
4543
}
4644

47-
public DotLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
45+
public DotLayout(Context context, AttributeSet attrs) {
4846
super(context, attrs);
4947

5048
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.DotLayout, 0, 0);

dot-view/src/main/java/me/codego/view/DotView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
import android.text.TextUtils;
99
import android.util.AttributeSet;
1010
import android.view.Gravity;
11+
import android.widget.TextView;
1112

1213
import me.codego.dotview.R;
1314

1415

1516
/**
1617
* Created by mengxn on 17-3-3.
1718
*/
18-
public class DotView extends android.support.v7.widget.AppCompatTextView {
19+
public class DotView extends TextView {
1920

2021
private Paint mPaint;
2122
private int mDotPadding;
@@ -48,7 +49,7 @@ public DotView(Context context, AttributeSet attrs) {
4849

4950
@Override
5051
protected void onDraw(Canvas canvas) {
51-
final int radius = getWidth()/2;
52+
final int radius = getWidth() / 2;
5253
canvas.drawCircle(radius, radius, radius, mPaint);
5354
super.onDraw(canvas);
5455
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Dec 12 20:52:08 CST 2019
1+
#Thu Jul 22 11:26:08 CST 2021
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)