Skip to content

Commit cec9cce

Browse files
committed
v1.1.0
bug修改 升级依赖库
1 parent c085215 commit cec9cce

13 files changed

Lines changed: 37 additions & 166 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@
88
.DS_Store
99
/build
1010
/captures
11-
.externalNativeBuild
12-
keys.gradle
11+
.externalNativeBuild

app/build.gradle

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

33
android {
4-
compileSdkVersion 27
4+
compileSdkVersion 28
55

66
defaultConfig {
77
applicationId "me.coffee.example.cleanableedittext"
8-
minSdkVersion 14
9-
targetSdkVersion 27
10-
versionCode 1
11-
versionName "1.0"
12-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13-
}
14-
15-
signingConfigs {
16-
myConfig {
17-
storeFile file(rootProject.ext.sign.storeKey)
18-
storePassword rootProject.ext.sign.storePassword
19-
keyAlias rootProject.ext.sign.keyAlias
20-
keyPassword rootProject.ext.sign.keyPassword
21-
v2SigningEnabled false
22-
}
8+
minSdkVersion 21
9+
targetSdkVersion 28
10+
versionCode 110
11+
versionName "1.1.0"
2312
}
2413

2514
buildTypes {
2615
debug {
27-
signingConfig signingConfigs.myConfig
2816
versionNameSuffix "-dev"
2917
}
3018
release {
31-
minifyEnabled true
32-
shrinkResources true
33-
zipAlignEnabled true
34-
signingConfig signingConfigs.myConfig
19+
minifyEnabled false
3520
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3621
}
3722
}
@@ -44,10 +29,7 @@ android {
4429

4530
dependencies {
4631
implementation fileTree(include: ['*.jar'], dir: 'libs')
47-
implementation 'com.android.support:appcompat-v7:27.1.1'
48-
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
49-
testImplementation 'junit:junit:4.12'
50-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
51-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
32+
implementation 'com.android.support:appcompat-v7:28.0.0'
33+
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
5234
implementation project(':cleanableedittext')
5335
}

app/src/androidTest/java/me/coffee/example/cleanableedittext/ExampleInstrumentedTest.java

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

app/src/main/java/me/coffee/example/cleanableedittext/MainActivity.java

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

33
import android.support.v7.app.AppCompatActivity;
44
import android.os.Bundle;
5+
import android.widget.EditText;
56

67
public class MainActivity extends AppCompatActivity {
78

89
@Override
910
protected void onCreate(Bundle savedInstanceState) {
1011
super.onCreate(savedInstanceState);
1112
setContentView(R.layout.activity_main);
13+
14+
EditText editText1 = findViewById(R.id.et1);
15+
EditText editText2 = findViewById(R.id.et2);
16+
17+
editText1.setText("abc");
18+
editText2.setText("123");
1219
}
1320
}

app/src/main/res/layout/activity_main.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
android:layout_height="wrap_content"
1313
android:padding="16dp"
1414
app:cleanButtonDrawable="@drawable/clean_btn"
15-
app:cleanButtonTint="@color/colorAccent" />
15+
app:cleanButtonTint="@color/colorAccent"
16+
app:layout_constraintTop_toTopOf="parent" />
1617

1718
<me.coffee.widget.CleanableEditText
19+
android:id="@+id/et2"
1820
android:layout_width="match_parent"
1921
android:layout_height="wrap_content"
2022
android:padding="16dp"

app/src/test/java/me/coffee/example/cleanableedittext/ExampleUnitTest.java

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

build.gradle

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
apply from: "config.gradle"
3-
apply from: "keys.gradle"
42

53
buildscript {
64

75
repositories {
8-
google()
9-
jcenter()
6+
maven { url 'https://maven.aliyun.com/repository/public' }
7+
maven { url 'https://maven.aliyun.com/repository/google' }
8+
maven { url 'https://maven.aliyun.com/repository/jcenter' }
9+
maven { url 'https://maven.aliyun.com/repository/central' }
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.1.4'
13-
classpath 'com.novoda:bintray-release:0.8.1'
14-
15-
// NOTE: Do not place your application dependencies here; they belong
16-
// in the individual module build.gradle files
12+
classpath 'com.android.tools.build:gradle:4.1.3'
1713
}
1814
}
1915

2016
allprojects {
2117
repositories {
22-
google()
23-
jcenter()
18+
maven { url 'https://maven.aliyun.com/repository/public' }
19+
maven { url 'https://maven.aliyun.com/repository/google' }
20+
maven { url 'https://maven.aliyun.com/repository/jcenter' }
21+
maven { url 'https://maven.aliyun.com/repository/central' }
2422
}
2523
tasks.withType(Javadoc) {
2624
options.addStringOption('Xdoclint:none', '-quiet')

cleanableedittext/build.gradle

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.novoda.bintray-release'
3-
4-
publish {
5-
userOrg = rootProject.ext.jcenter.userOrg
6-
repoName = rootProject.ext.jcenter.repoName
7-
groupId = rootProject.ext.jcenter.groupId
8-
artifactId = rootProject.ext.jcenter.artifactId
9-
publishVersion = rootProject.ext.jcenter.publishVersion
10-
desc = rootProject.ext.jcenter.desc
11-
website = rootProject.ext.jcenter.website
12-
}
132

143
android {
15-
compileSdkVersion 27
4+
compileSdkVersion 28
165

176
defaultConfig {
18-
minSdkVersion 14
19-
targetSdkVersion 27
20-
versionCode 1
21-
versionName "1.0"
22-
23-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
24-
7+
minSdkVersion 21
8+
targetSdkVersion 28
9+
versionCode 110
10+
versionName "1.1.0"
2511
}
2612

2713
buildTypes {
@@ -39,8 +25,5 @@ android {
3925

4026
dependencies {
4127
implementation fileTree(include: ['*.jar'], dir: 'libs')
42-
implementation 'com.android.support:appcompat-v7:27.1.1'
43-
testImplementation 'junit:junit:4.12'
44-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
45-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
28+
implementation 'com.android.support:appcompat-v7:28.0.0'
4629
}

cleanableedittext/src/androidTest/java/me/coffee/widget/ExampleInstrumentedTest.java

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

cleanableedittext/src/main/java/me/coffee/widget/CleanableEditText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
6868

6969
@Override
7070
public void afterTextChanged(Editable s) {
71-
setCleanButtonVisible(s.length() > 0);
71+
setCleanButtonVisible(hasFocus() && s.length() > 0);
7272
}
7373
});
7474
}

0 commit comments

Comments
 (0)