Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced RxJava with Coroutines #22

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
language: android
dist: trusty

notifications:
email:
- [email protected]

jdk:
- oraclejdk8

env:
global:
- ANDROID_API_LEVEL=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3

android:
components:
- tools
- tools
- build-tools-28.0.3
- platform-tools

before_script:
- mkdir "$ANDROID_HOME/licenses" || true
- echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
- extra-android-support
licenses:
- 'android-sdk-license-.+'

before_install:
- yes | sdkmanager "platforms;android-28"

notifications:
email:
- [email protected]

cache: false
sudo: false

install:
- chmod +x ./gradlew; ls -l gradlew; ./gradlew wrapper -v
- chmod +x gradlew
# https://github.com/travis-ci/travis-ci/issues/8874#issuecomment-350350607
- yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL"

script:
- ./gradlew clean build assemble
- ./gradlew build

cache:
directories:
- $HOME/.m2
- $HOME/.gradle
branches:
only:
- master
language: android
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
Material Number Sliding Picker
======================
# Material Number Sliding Picker (Fork)

A widget that enables the user to select a number from a predefined range.
Progress value can be changed using the up and down arrows, click and edit the editable text or swiping up/down or left/right.

![Screen shot](./art/video.gif)
```gradle
dependencies {
implementation 'com.github.guilhe:NumberSlidingPicker:-SNAPSHOT'
}
```

<img src="./art/video.gif" alt="Screen shot" width="50%"/>

[![Build Status](https://travis-ci.org/sephiroth74/NumberSlidingPicker.svg?branch=master)](https://travis-ci.org/sephiroth74/NumberSlidingPicker) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library/number-sliding-picker/badge.svg)](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library/number-sliding-picker) [![](https://jitpack.io/v/sephiroth74/NumberSlidingPicker.svg)](https://jitpack.io/#sephiroth74/NumberSlidingPicker)

[![Build Status](https://travis-ci.org/sephiroth74/NumberSlidingPicker.svg?branch=master)](https://travis-ci.org/sephiroth74/NumberSlidingPicker)
# About this Fork

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library/number-sliding-picker/badge.svg)](https://maven-badges.herokuapp.com/maven-central/it.sephiroth.android.library/number-sliding-picker)
[![](https://jitpack.io/v/sephiroth74/NumberSlidingPicker.svg)](https://jitpack.io/#sephiroth74/NumberSlidingPicker)
I've forked this project to remove _RxJava_ dependency since we can achieve the same result using coroutines.

Installation
===
# Installation

## Maven

Expand All @@ -22,7 +27,7 @@ compile 'it.sephiroth.android.library:number-sliding-picker:**version**'

## JitPack

**Step 1.** Add the JitPack repository to your build file:
### Step 1. Add the JitPack repository to your build file:

```gradle
allprojects {
Expand All @@ -33,7 +38,7 @@ allprojects {
}
```

**Step 2.** Add the dependency
### Step 2. Add the dependency

```gradle
dependencies {
Expand All @@ -43,9 +48,7 @@ dependencies {

Get the latest version on [JitPack](https://jitpack.io/#sephiroth74/NumberSlidingPicker)


Usage
===
# Usage

```xml
<it.sephiroth.android.library.numberpicker.NumberPicker
Expand Down Expand Up @@ -80,8 +83,7 @@ Usage
}
```

License
===
# License
MIT License

Copyright (c) 2019 Alessandro Crugnola
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
applicationId "it.sephiroth.android.numberpicker.demo"
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.41'
ext.kotlin_version = '1.4.30'
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-rc03'
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

ANDROID_BUILD_SDK_VERSION=28
ANDROID_BUILD_TARGET_SDK_VERSION=28
ANDROID_BUILD_SDK_VERSION=29
ANDROID_BUILD_TARGET_SDK_VERSION=29

VERSION_NAME=1.1.1
VERSION_CODE=6
VERSION_NAME=1.1.2
VERSION_CODE=7
GROUP=it.sephiroth.android.library

POM_DESCRIPTION=Sliding Number Picker for Android
Expand Down
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jan 25 07:24:28 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
zipStorePath=wrapper/dists
31 changes: 10 additions & 21 deletions numberpicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'


group GROUP
version VERSION_NAME

android {
compileSdkVersion 28
compileSdkVersion 30

defaultConfig {
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 30
versionCode VERSION_CODE as int
versionName VERSION_NAME

Expand Down Expand Up @@ -44,27 +43,17 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

// implementation project(':xtooltip')

implementation 'com.github.sephiroth74:android-target-tooltip:v2.0.4'
implementation 'com.github.sephiroth74:AndroidUIGestureRecognizer:v1.2.7'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.2.0-alpha03'

implementation 'com.google.android.material:material:1.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'

implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.github.sephiroth74:android-target-tooltip:v2.0.4'
implementation 'com.github.sephiroth74:AndroidUIGestureRecognizer:v1.2.7'

testImplementation "androidx.test.ext:junit:1.1.1"

androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation "androidx.test.ext:junit:1.1.2"
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

apply from: 'https://raw.githubusercontent.com/sephiroth74/gradle-mvn-push/master/gradle-mvn-push.gradle'
apply from: 'https://raw.githubusercontent.com/sephiroth74/gradle-mvn-push/master/gradle-mvn-push.gradle'
3 changes: 1 addition & 2 deletions numberpicker/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.sephiroth.android.library.numberpicker"/>
<manifest package="it.sephiroth.android.library.numberpicker" />
Loading