Skip to content

Commit 5f58789

Browse files
Revamped to Compose and Bump to v4.0.0 (#37)
1 parent 168bfe4 commit 5f58789

File tree

64 files changed

+999
-1747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+999
-1747
lines changed

CHANGELOG.md

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

3+
## Version 4.0.0 *(XX/XX/2023)*
4+
5+
- Revamped Number Keyboard to Compose #37
6+
37
## Version 3.1.0 *(13/12/2022)*
48

59
- Add text size attribute (thanks @gerynugrh)

README.md

Lines changed: 2 additions & 2 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:3.1.0'
28+
implementation 'com.github.davidmigloz:number-keyboard:4.0.0'
2929
}
3030
```
3131

@@ -111,7 +111,7 @@ Pull request are very appreciated.
111111

112112
## License
113113

114-
Copyright (c) 2018 David Miguel Lozano
114+
Copyright (c) 2023 David Miguel Lozano
115115

116116
Licensed under the Apache License, Version 2.0 (the "License");
117117
you may not use this file except in compliance with the License.

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ buildscript {
77
}
88
dependencies {
99
apply from: 'dependencies.gradle'
10-
classpath gradleDependencies.androidGradle
11-
classpath gradleDependencies.kotlinGradle
10+
classpath "com.android.tools.build:gradle:$androidGradle"
11+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"
1212
}
1313
}
1414

@@ -19,6 +19,6 @@ allprojects {
1919
}
2020
}
2121

22-
task clean(type: Delete) {
23-
delete rootProject.buildDir
22+
tasks.register('clean', Delete) {
23+
delete rootProject.layout.buildDirectory
2424
}

configurations.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ext {
2-
3-
javaVersion = JavaVersion.VERSION_1_8
2+
javaVersion = JavaVersion.VERSION_18
3+
jvmToolchainVersion = 18
44

55
androidConfig = [
6-
minSdkVersion : 19,
7-
targetSdkVersion : 33,
8-
compileSdkVersion: 33
6+
minSdkVersion : 21,
7+
targetSdkVersion : 34,
8+
compileSdkVersion: 34
99
]
1010

1111
/**

dependencies.gradle

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
11
ext {
2-
32
//----------------------------------------------------------------------------------------------
43
// Gradle Dependencies
54
//----------------------------------------------------------------------------------------------
65

76
// 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
8-
androidGradle = '7.3.1'
9-
// Kotlin version : https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
10-
kotlin = '1.7.22'
11-
12-
gradleDependencies = [
13-
androidGradle: "com.android.tools.build:gradle:${androidGradle}",
14-
kotlinGradle : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin}",
15-
]
7+
androidGradle = '8.1.2'
8+
// Kotlin : https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
9+
// Kotlin Compose Compatibility Map : https://developer.android.com/jetpack/androidx/releases/compose-kotlin
10+
kotlin = '1.9.10'
11+
// Compose Compiler : https://developer.android.com/jetpack/androidx/releases/compose-compiler
12+
composeCompiler = '1.5.3'
1613

1714
//----------------------------------------------------------------------------------------------
1815
// App Dependencies
1916
//----------------------------------------------------------------------------------------------
2017

21-
// AndroidX Core : https://mvnrepository.com/artifact/androidx.core/core | https://developer.android.com/jetpack/androidx/androidx-rn
22-
androidXCore = "1.9.0"
23-
// AppCompat : https://mvnrepository.com/artifact/androidx.appcompat/appcompat | https://developer.android.com/topic/libraries/support-library/packages#v7-appcompat
24-
appcompat = '1.5.1'
25-
// Android Annotations : https://mvnrepository.com/artifact/androidx.annotation/annotation?repo=google | https://developer.android.com/topic/libraries/support-library/packages#annotations
26-
annotations = "1.5.0"
27-
// ConstraintLayout : https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
28-
constraintLayout = '2.1.4'
29-
30-
appDependencies = [
31-
androidXCore : "androidx.core:core:${androidXCore}",
32-
appcompat : "androidx.appcompat:appcompat:${appcompat}",
33-
annotations : "androidx.annotation:annotation:${annotations}",
34-
constraintLayout: "androidx.constraintlayout:constraintlayout:${constraintLayout}",
35-
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:${kotlin}",
36-
]
37-
38-
//----------------------------------------------------------------------------------------------
39-
// Debug Dependencies
40-
//----------------------------------------------------------------------------------------------
41-
42-
// Timber (logger) : https://mvnrepository.com/artifact/com.jakewharton.timber/timber | https://github.com/JakeWharton/timber
43-
timber = '5.0.1'
44-
45-
debugDependencies = [
46-
timber: "com.jakewharton.timber:timber:${timber}",
47-
]
48-
49-
//----------------------------------------------------------------------------------------------
50-
// Test Dependencies
51-
//----------------------------------------------------------------------------------------------
52-
53-
// JUnit (unit testing framework) : https://mvnrepository.com/artifact/junit/junit | http://junit.org/junit4/
54-
junit = '4.13.2'
55-
// Mockito (mocking framework) : https://mvnrepository.com/artifact/org.mockito/mockito-core | http://site.mockito.org/
56-
mockito = '4.9.0'
57-
58-
testDependencies = [
59-
junit : "junit:junit:${junit}",
60-
mockito: "org.mockito:mockito-core:${mockito}",
61-
]
18+
// Compose Bill of Materials : https://mvnrepository.com/artifact/androidx.compose/compose-bom
19+
composeBoM = "2023.10.01"
20+
// Compose Navigation : https://developer.android.com/jetpack/compose/navigation
21+
composeNav = '2.7.5'
6222
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ 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-7.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

lib/build.gradle

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android'
1+
plugins {
2+
id("com.android.library")
3+
id("kotlin-android")
4+
}
35

4-
ext.versionMajor = 3 // API Changes, adding big new feature, redesign the App
5-
ext.versionMinor = 1 // New features in a backwards-compatible manner
6-
ext.versionPatch = 0 // Backwards-compatible bug fixes
7-
ext.versionClassifier = null // Pre-releases (alpha, beta, rc, SNAPSHOT...)
6+
ext {
7+
versionMajor = 4 // API Changes, adding big new feature, redesign the App
8+
versionMinor = 0 // New features in a backwards-compatible manner
9+
versionPatch = 0 // Backwards-compatible bug fixes
10+
versionClassifier = null // Pre-releases (alpha, beta, rc, SNAPSHOT...)
11+
}
812

913
android {
14+
namespace 'com.davidmiguel.numberkeyboard'
15+
1016
compileSdkVersion androidConfig.compileSdkVersion
1117

18+
buildFeatures {
19+
compose true
20+
}
21+
22+
composeOptions {
23+
kotlinCompilerExtensionVersion = composeCompiler
24+
}
25+
26+
kotlin {
27+
jvmToolchain(jvmToolchainVersion)
28+
}
29+
1230
defaultConfig {
1331
minSdkVersion androidConfig.minSdkVersion
1432
targetSdkVersion androidConfig.targetSdkVersion
@@ -22,9 +40,7 @@ android {
2240
}
2341

2442
dependencies {
25-
api appDependencies.constraintLayout
26-
implementation appDependencies.androidXCore
27-
implementation appDependencies.appcompat
28-
implementation appDependencies.annotations
29-
implementation appDependencies.kotlinStdlib
43+
implementation platform("androidx.compose:compose-bom:$composeBoM")
44+
implementation("androidx.compose.material3:material3")
45+
implementation("androidx.compose.material:material-icons-extended")
3046
}

0 commit comments

Comments
 (0)