Skip to content

Commit a7ca41c

Browse files
committed
Migrate to Kotlin #21
1 parent 7abb198 commit a7ca41c

21 files changed

+721
-743
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Change Log
22

3+
## Version 3.0.0 *(30/12/2018)*
4+
5+
- Migrate to Kotlin #21
6+
- Refactor support lib to AndroidX #13
7+
- Extract dependencies and configurations from build files #22
8+
- Add numberkeyboard_ resource prefix #23 (breaking change)
9+
10+
### Migration
11+
12+
Add the prefix `numberkeyboard_` to all the library attributes and resources.
13+
E.g.
14+
```
15+
Before: keyboard:keyboardType="integer"
16+
Now: keyboard:numberkeyboard_keyboardType="integer"
17+
```
18+
319
## Version 2.0.1 *(23/04/2018)*
420

521
- Fix layout issues when using dynamic height #10

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Add the dependency:
2525

2626
```gradle
2727
dependencies {
28-
compile 'com.github.davidmigloz:number-keyboard:2.0.1'
28+
compile 'com.github.davidmigloz:number-keyboard:3.0.0'
2929
}
3030
```
3131

@@ -40,26 +40,26 @@ Use `NumberKeyboard` view in your layout:
4040
xmlns:android="http://schemas.android.com/apk/res/android"
4141
xmlns:keyboard="http://schemas.android.com/apk/res-auto"
4242
...
43-
keyboard:keyboardType="integer"
43+
keyboard:numberkeyboard_keyboardType="integer"
4444
... />
4545
```
4646

4747
#### Attributes
4848

49-
- `keyboard:keyboardType="[integer|decimal|fingerprint|custom]"` (required): defines the type of keyboard.
49+
- `keyboard:numberkeyboard_keyboardType="[integer|decimal|fingerprint|custom]"` (required): defines the type of keyboard.
5050
- `integer`: numbers and backspace keys.
5151
- `decimal`: numbers, comma and backspace keys.
5252
- `fingerprint`: numbers, fingerprint and backspace keys.
5353
- `custom`: numbers and defined auxiliary keys.
54-
- `keyboard:keyWidth="[dimension]"` (default: `match_parent`): key width (`wrap_content` not allowed).
55-
- `keyboard:keyHeight="[dimension]"` (default: `match_parent`): key height (`wrap_content` not allowed).
56-
- `keyboard:keyPadding="[dimension]"` (default: `16dp`): key padding.
57-
- `keyboard:numberKeyBackground="[reference]"` (default: circle): number keys background drawable.
58-
- `keyboard:numberKeyTextColor="[reference]"` (default: dark blue): number keys text color.
59-
- `keyboard:leftAuxBtnIcon="[reference]"` (default: none): if `keyboardType="custom"`, icon shown in left auxiliary button.
60-
- `keyboard:leftAuxBtnBackground="[reference]"` (default: none): if `keyboardType="custom"`, left auxiliary button background.
61-
- `keyboard:rightAuxBtnIcon="[reference]"` (default: none): if `keyboardType="custom"`, icon shown in right auxiliary button.
62-
- `keyboard:rightAuxBtnBackground="[reference]"` (default: none): if `keyboardType="custom"`, right auxiliary button background.
54+
- `keyboard:numberkeyboard_keyWidth="[dimension]"` (default: `match_parent`): key width (`wrap_content` not allowed).
55+
- `keyboard:numberkeyboard_keyHeight="[dimension]"` (default: `match_parent`): key height (`wrap_content` not allowed).
56+
- `keyboard:numberkeyboard_keyPadding="[dimension]"` (default: `16dp`): key padding.
57+
- `keyboard:numberkeyboard_numberKeyBackground="[reference]"` (default: circle): number keys background drawable.
58+
- `keyboard:numberkeyboard_numberKeyTextColor="[reference]"` (default: dark blue): number keys text color.
59+
- `keyboard:numberkeyboard_leftAuxBtnIcon="[reference]"` (default: none): if `keyboardType="custom"`, icon shown in left auxiliary button.
60+
- `keyboard:numberkeyboard_leftAuxBtnBackground="[reference]"` (default: none): if `keyboardType="custom"`, left auxiliary button background.
61+
- `keyboard:numberkeyboard_rightAuxBtnIcon="[reference]"` (default: none): if `keyboardType="custom"`, icon shown in right auxiliary button.
62+
- `keyboard:numberkeyboard_rightAuxBtnBackground="[reference]"` (default: none): if `keyboardType="custom"`, right auxiliary button background.
6363

6464
#### Methods
6565

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
dependencies {
99
apply from: 'dependencies.gradle'
1010
classpath gradleDependencies.androidGradle
11+
classpath gradleDependencies.kotlinGradle
1112
}
1213
}
1314

dependencies.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ ext {
66

77
// Android Plugin for Gradle : https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google | https://developer.android.com/studio/releases/gradle-plugin.html#updating-plugin
88
androidGradle = '3.4.0-alpha08'
9+
// Kotlin version : https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
10+
kotlin = '1.3.11'
911

1012
gradleDependencies = [
1113
androidGradle: "com.android.tools.build:gradle:${androidGradle}",
14+
kotlinGradle : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin}",
1215
]
1316

1417
//----------------------------------------------------------------------------------------------
@@ -29,6 +32,7 @@ ext {
2932
appcompat : "androidx.appcompat:appcompat:${appcompat}",
3033
annotations : "androidx.annotation:annotation:${annotations}",
3134
constraintLayout: "androidx.constraintlayout:constraintlayout:${constraintLayout}",
35+
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:${kotlin}",
3236
]
3337

3438
//----------------------------------------------------------------------------------------------

lib/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'kotlin-android-extensions'
3+
apply plugin: 'kotlin-android'
24

3-
ext.versionMajor = 2 // API Changes, adding big new feature, redesign the App
5+
ext.versionMajor = 3 // API Changes, adding big new feature, redesign the App
46
ext.versionMinor = 0 // New features in a backwards-compatible manner
5-
ext.versionPatch = 1 // Backwards-compatible bug fixes
7+
ext.versionPatch = 0 // Backwards-compatible bug fixes
68
ext.versionClassifier = null // Pre-releases (alpha, beta, rc, SNAPSHOT...)
79

810
android {
@@ -26,4 +28,5 @@ dependencies {
2628
implementation appDependencies.androidXCore
2729
implementation appDependencies.appcompat
2830
implementation appDependencies.annotations
31+
implementation appDependencies.kotlinStdlib
2932
}

0 commit comments

Comments
 (0)