Skip to content

Commit

Permalink
version 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
long76 committed Jul 17, 2021
1 parent 8800bd4 commit 9712748
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 60 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# AndroidXColorPicker

![GitHub release (latest by date)](https://img.shields.io/github/v/release/long76/AndroidXColorPicker)
![GitHub](https://img.shields.io/github/license/long76/AndroidXColorPicker)
![Android CI](https://github.com/long76/AndroidXColorPicker/workflows/Android%20CI/badge.svg)
![Bintray](https://img.shields.io/bintray/v/long76/maven/AndroidXColorPicker)
![Maven Central](https://img.shields.io/maven-central/v/io.github.long76/androidxcolorpicker)
# AndroidXColorPicker

Color Picker based on [repo](https://github.com/Pes8/android-material-color-picker-dialog) and updated to AndroidX.

# Usage
## Usage

**Requirements**
### Requirements

minSdkVersion `21`

**build.gradle**
### build.gradle

```groovy
implementation 'io.github.long76:androidxcolorpicker:2.0'
implementation 'io.github.long76:androidxcolorpicker:3.0'
```

# Features
## Features

* Color Picker Dialog
* Color Picker Preference

# Example
## Example

Color Picker Dialog

Expand All @@ -38,7 +40,8 @@ colorPicker.show();

Color Picker Preference

**settings.xml**
### settings.xml

```xml
<io.github.long76.androidxcolorpicker.AXColorPickerPreference
app:AXColorPickerPrefName="preferences"
Expand All @@ -51,10 +54,11 @@ Color Picker Preference
</io.github.long76.androidxcolorpicker.AXColorPickerPreference>
```

# License
## License

MIT License

Copyright (c) 2017 Simone Pessotto (http://www.simonepessotto.it)
Copyright (c) 2017 Simone Pessotto (<http://www.simonepessotto.it>)

Copyright (c) 2020 long76

Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.android.tools.build:gradle:4.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -17,6 +16,6 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
12 changes: 2 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand All @@ -16,4 +7,5 @@ org.gradle.jvmargs=-Xmx1536m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=true
signing.keyId=1202B12F
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
53 changes: 19 additions & 34 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'signing'

version = '2.0'
version = '3.0'

android {
compileSdkVersion 29
compileSdkVersion 30
resourcePrefix 'axcolorpicker_'

defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName version
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down Expand Up @@ -38,12 +38,12 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference:1.1.1'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
}

task sourcesJar(type: Jar) {
Expand All @@ -56,9 +56,17 @@ task javadocJar(type: Jar, dependsOn: 'releaseJavadoc') {
from "$buildDir/docs/javadoc/"
}

artifacts {
archives javadocJar, sourcesJar
}

signing {
sign configurations.archives
}

publishing {
publications {
mvnBintray(MavenPublication) {
mvnCentral(MavenPublication) {
artifact("$buildDir/outputs/aar/library-release.aar")
artifact javadocJar
artifact sourcesJar
Expand Down Expand Up @@ -105,27 +113,4 @@ publishing {
}
}
}
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['mvnBintray']
publish = true
override = true
pkg {
repo = 'maven'
name = 'AndroidXColorPicker'
licenses = ['MIT']
publicDownloadNumbers = true
websiteUrl = 'https://github.com/long76/AndroidXColorPicker'
issueTrackerUrl = 'https://github.com/long76/AndroidXColorPicker/issues'
vcsUrl = 'https://github.com/long76/AndroidXColorPicker.git'
githubRepo = 'long76/AndroidXColorPicker'
version {
name = this.version
released = new Date()
vcsTag = this.version
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
android:textSize="18sp"/>

<EditText
tools:ignore="Autofill"
android:id="@+id/hexCode"
style="@style/Widget.AppCompat.EditText"
android:layout_width="wrap_content"
Expand All @@ -110,6 +111,7 @@
android:id="@+id/okColorButton"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_above="@id/hexCode"
android:layout_alignBaseline="@+id/hexCode"
android:layout_alignParentBottom="false"
android:layout_alignParentEnd="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
android:text="@string/axcolorpicker_hash"/>

<EditText
tools:ignore="Autofill"
android:id="@id/hexCode"
style="@style/Widget.AppCompat.EditText"
android:layout_width="wrap_content"
Expand Down

0 comments on commit 9712748

Please sign in to comment.