Skip to content

Commit b3044d2

Browse files
author
Joe Jensen
authored
Merge pull request #65 from joejensen8/m.cardtype_name_conflict
Renaming name in CardType to prevent Enum Kotlin override conflicts
2 parents 0c1a7e8 + cf8e4c9 commit b3044d2

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

CreditCardEntry/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
buildscript {
22
repositories {
33
mavenCentral()
4+
google()
45
}
56
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.3.3'
7+
classpath 'com.android.tools.build:gradle:3.1.4'
78
}
89
}
910
apply plugin: 'com.android.library'
@@ -13,12 +14,11 @@ repositories {
1314
}
1415

1516
android {
16-
compileSdkVersion 25
17-
buildToolsVersion '25.0.3'
17+
compileSdkVersion 28
1818

1919
defaultConfig {
2020
minSdkVersion 9
21-
targetSdkVersion 25
21+
targetSdkVersion 28
2222
}
2323

2424
sourceSets {
@@ -32,6 +32,7 @@ android {
3232
manifest.srcFile 'AndroidManifest.xml'
3333
}
3434
}
35+
buildToolsVersion '27.0.3'
3536
}
3637

3738
dependencies {

CreditCardEntry/src/com/devmarvel/creditcardentry/library/CardType.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public enum CardType implements Serializable {
4040
INVALID("Unknown", R.drawable.unknown_cc, null, null);
4141

4242
/** name for humans */
43-
public final String name;
43+
public final String friendlyName;
4444

4545
/** regex that matches the entire card number */
4646
public final String fullRegex;
@@ -54,15 +54,15 @@ public enum CardType implements Serializable {
5454
/** drawable for the back of the card */
5555
public final int backResource = R.drawable.cc_back;
5656

57-
CardType(String name, @DrawableRes int imageResource, String fullRegex, String typeRegex) {
58-
this.name = name;
57+
CardType(String friendlyName, @DrawableRes int imageResource, String fullRegex, String typeRegex) {
58+
this.friendlyName = friendlyName;
5959
this.frontResource = imageResource;
6060
this.fullRegex = fullRegex;
6161
this.typeRegex = typeRegex;
6262
}
6363

6464
@Override
6565
public String toString() {
66-
return name;
66+
return friendlyName;
6767
}
6868
}

CreditCardEntryDemo/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
buildscript {
22
repositories {
33
mavenCentral()
4+
google()
45
}
56
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.3.3'
7+
classpath 'com.android.tools.build:gradle:3.1.4'
78
}
89
}
910
apply plugin: 'com.android.application'
@@ -13,12 +14,11 @@ repositories {
1314
}
1415

1516
android {
16-
compileSdkVersion 25
17-
buildToolsVersion '25.0.3'
17+
compileSdkVersion 28
1818

1919
defaultConfig {
2020
minSdkVersion 9
21-
targetSdkVersion 25
21+
targetSdkVersion 28
2222
}
2323

2424
sourceSets {

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
buildscript {
22
repositories {
33
mavenCentral()
4+
google()
45
}
56
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.3.3'
7+
classpath 'com.android.tools.build:gradle:3.1.4'
78
}
89
}
910

1011
repositories {
1112
mavenCentral()
13+
google()
1214
}
1315

1416
task wrapper(type: Wrapper) {
15-
gradleVersion = '2.3.3'
17+
gradleVersion = '3.1.4'
1618
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jul 16 05:52:41 WAT 2017
1+
#Wed Sep 05 17:49:40 PDT 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)