Skip to content

Commit

Permalink
Merge pull request #13 from AliAzaz/release-v2.1_bugs_fixes
Browse files Browse the repository at this point in the history
Bugs Fixes 2.1
  • Loading branch information
AliAzaz authored Oct 9, 2023
2 parents fbd6e51 + 1e7ab7b commit d3d3b04
Show file tree
Hide file tree
Showing 18 changed files with 120 additions and 88 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ Please see the description of this library in my article ***[Edittext Picker Lib
## Implementation
In project.gradle add this code it in root build.gradle at the end of repositories:
```sh
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
}
```
Now, add the dependency in app.gradle:
Expand Down Expand Up @@ -127,11 +128,23 @@ txtPicker = EditTextPicker(this,
## Set values at Run time
Users can easily set the attribute values at runtime.
```sh
txtDate.setMask("##-##-####").setRequired(false)
```
<br>
## EditText-Picker Gradle Configuration
```
edittextpicker = 2.1.1
gradle = 7.4.2
kotlin = 1.8.0
build_version = 34.0.0
min_api_level = 21
max_api_level = 34
```
## CONNECT👍
Expand All @@ -140,7 +153,7 @@ txtDate.setMask("##-##-####").setRequired(false)
[![Medium Badge](https://img.shields.io/badge/-aliazazalam-black?style=flat&logo=Medium&logoColor=white&link=https://medium.com/@ali.azaz.alam)](https://medium.com/@ali.azaz.alam)
[![Stackoverflow Badge](https://img.shields.io/badge/-aliazaz-gray?style=flat&logo=stackoverflow&logoColor=orange&link=https://stackoverflow.com/story/ali-azaz-alam)](https://stackoverflow.com/story/ali-azaz-alam)
## LICENSE
Distributed under the MIT license. See [LICENSE](https://github.com/AliAzaz/Edittext-Library/blob/master/LICENSE) information.
Distributed under the MIT license.
See [LICENSE](https://github.com/AliAzaz/Edittext-Library/blob/master/LICENSE) information.
36 changes: 20 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
}

android {
compileSdk compile_version
buildToolsVersion = build_version
compileSdk ConfigurationData.compileSdkVersion
buildToolsVersion = ConfigurationData.buildToolsVersion
namespace 'com.edittext.aliazaz'

defaultConfig {
applicationId "com.edittextpicker.aliazaz.edittextpicker"
minSdkVersion min_version
targetSdkVersion target_version
versionCode version_code
versionName version_name
applicationId "com.edittext.aliazaz"
minSdkVersion ConfigurationData.minSdkVersion
targetSdkVersion ConfigurationData.targetSdkVersion
versionCode ConfigurationData.versionCode
versionName ConfigurationData.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -30,20 +31,23 @@ android {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
dataBinding {
enabled = true
buildFeatures {
dataBinding true
viewBinding true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
implementation "androidx.core:core-ktx:$corektx_version"
implementation AndroidApp.appCompat
implementation AndroidApp.coreKTX
implementation AndroidApp.stringLANG

implementation Layouts.constraint

implementation project(':edittextpicker')

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test.ext:junit:$junit_ext_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
testImplementation Testing.junit
androidTestImplementation Testing.junitImpl
androidTestImplementation Testing.expresso
}
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.edittextpicker.aliazaz.edittextpicker">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.edittextpicker.aliazaz.edittextpicker
package com.edittext.aliazaz

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.edittextpicker.aliazaz.edittextpicker
package com.edittext.aliazaz

import android.text.InputType
import android.widget.Toast
import com.edittext.aliazaz.databinding.ActivityMainBinding
import com.edittextpicker.aliazaz.EditTextPicker
import com.edittextpicker.aliazaz.edittextpicker.databinding.ActivityMainBinding
import com.edittextpicker.aliazaz.repository.EditTextPickerBuilder

/*
Expand Down
26 changes: 5 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
build_version = '33.0.0'
compile_version = 33
target_version = 33
min_version = 21
version_code = 6
version_name = "2.1.0"
kotlin_version = "1.6.10"
corektx_version = "1.9.0"
appcompat_version = "1.6.0"
constraint_version = "2.1.4"
espresso_version = '3.5.1'
junit_version = '4.13.2'
junit_ext_version = '1.1.5'
}

repositories {
google()
mavenCentral()
}
dependencies {

classpath 'com.android.tools.build:gradle:7.4.2'
}
}

plugins {
id 'com.android.application' version '7.2.2' apply false
id 'com.android.library' version '7.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
7 changes: 7 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/java/ConfigurationData.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
object ConfigurationData {
const val minSdkVersion = 21
const val targetSdkVersion = 34
const val compileSdkVersion = 34
const val versionCode = 7
const val versionName = "2.1.1"
const val buildToolsVersion = "34.0.0"
}
19 changes: 19 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
object Layouts {
const val constraint =
"androidx.constraintlayout:constraintlayout:${DependenciesVersions.constraintVersion}"
}

object AndroidApp {
const val appCompat =
"androidx.appcompat:appcompat:${DependenciesVersions.supportLibraryVersion}"
const val coreKTX = "androidx.core:core-ktx:${DependenciesVersions.ktxVersion}"
const val stringLANG =
"org.apache.commons:commons-lang3:${DependenciesVersions.stringLangVersion}"
}

object Testing {
const val junit = "junit:junit:${DependenciesVersions.junitVersion}"
const val junitImpl = "androidx.test.ext:junit:${DependenciesVersions.junitImplVersion}"
const val expresso =
"androidx.test.espresso:espresso-core:${DependenciesVersions.espressoVersion}"
}
10 changes: 10 additions & 0 deletions buildSrc/src/main/java/DependenciesVersions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
object DependenciesVersions {
const val stringLangVersion = "3.12.0"
const val constraintVersion = "2.1.4"
const val junitImplVersion = "1.1.5"
const val espressoVersion = "3.5.1"
const val supportLibraryVersion = "1.6.1"
const val ktxVersion = "1.12.0"
const val junitVersion = "4.13.2"
const val cardVersion = "1.0.0"
}
52 changes: 18 additions & 34 deletions edittextpicker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
}

ext {
build_version = '33.0.0'
compile_version = 33
target_version = 33
min_version = 21
versionCode = 5
versionName = "2.1.0"
kotlin_version = "1.6.10"
corektx_version = "1.9.0"
appcompat_version = "1.6.0"
espresso_version = '3.5.1'
junit_version = '4.13.2'
junit_ext_version = '1.1.5'
stringlangVersion = "3.12.0"
id 'org.jetbrains.kotlin.android'
}

android {
compileSdk compile_version
buildToolsVersion = build_version
compileSdk ConfigurationData.compileSdkVersion
buildToolsVersion = ConfigurationData.buildToolsVersion
namespace 'com.edittextpicker.aliazaz'

defaultConfig {
minSdkVersion min_version
targetSdkVersion target_version
versionCode versionCode
versionName versionName
minSdkVersion ConfigurationData.minSdkVersion
targetSdkVersion ConfigurationData.targetSdkVersion
versionCode ConfigurationData.versionCode
versionName ConfigurationData.versionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'

}

buildTypes {
Expand All @@ -43,25 +26,26 @@ android {
}
}

lintOptions {
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

lint {
abortOnError false
}

}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.core:core-ktx:$corektx_version"
implementation "org.apache.commons:commons-lang3:$stringlangVersion"
implementation AndroidApp.appCompat
implementation AndroidApp.coreKTX
implementation AndroidApp.stringLANG

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test.ext:junit:$junit_ext_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
testImplementation Testing.junit
androidTestImplementation Testing.junitImpl
androidTestImplementation Testing.expresso
}
2 changes: 2 additions & 0 deletions edittextpicker/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@

#custom modules
-keep class com.edittextpicker.aliazaz.model.EditTextPickerModel { *; }
-keep class com.edittextpicker.aliazaz.EditTextPicker { *; }
-keep class com.edittextpicker.aliazaz.repository.EditTextPickerBuilder { *; }
2 changes: 1 addition & 1 deletion edittextpicker/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="com.edittextpicker.aliazaz" />
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.edittextpicker.aliazaz.EditTextPicker
/*
* @author Ali Azaz Alam
* */
interface EditTextViews {
internal interface EditTextViews {

fun setMask(mask: String): EditTextPicker

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Mar 20 11:36:17 PKT 2021
#Fri Oct 06 12:10:29 PKT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ dependencyResolutionManagement {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url 'https://jitpack.io' }
}
}
include ':app', ':edittextpicker'
rootProject.name = 'Edittext-Picker'

0 comments on commit d3d3b04

Please sign in to comment.