Skip to content

Commit

Permalink
Release version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneBg committed Dec 29, 2018
1 parent 375118c commit 9d47b69
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 20 deletions.
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
[![Release](https://jitpack.io/v/StephaneBg/SimpleNumberPicker.svg)](https://jitpack.io/#StephaneBg/SimpleNumberPicker)
[ ![Download](https://api.bintray.com/packages/stephanebg/SimpleNumberPicker/SimpleNumberPicker/images/download.svg) ](https://bintray.com/stephanebg/SimpleNumberPicker/SimpleNumberPicker/_latestVersion)

# SimpleNumberPicker

A customisable decimal and hexadecimal material picker view for Android.

<img src="https://raw.githubusercontent.com/StephaneBg/SimpleNumberPicker/master/artwork/decimal_picker.png"><img src="https://raw.githubusercontent.com/StephaneBg/SimpleNumberPicker/master/artwork/hexa_picker.png">

## Download
Add the JitPack repository in your build.gradle at the end of repositories:
```
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
And add the dependencies
#### AndroidX
## Add the dependency
```
dependencies {
implementation 'com.github.StephaneBg:SimpleNumberPicker:2.0'
implementation 'com.sbgapps:simplenumberpicker:2.1.0'
}
```

#### Support Library
```
dependencies {
implementation 'com.github.StephaneBg:SimpleNumberPicker:1.5'
}
```

## Usage

Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ buildscript {
dependencies {
classpath(Build.androidGradle)
classpath(Build.kotlinGradlePlugin)
classpath(Build.mavenGradlePlugin)
classpath(Build.bintrayGradlePlugin)
}
}

Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ object Versions {
object Build {
val androidGradle = "com.android.tools.build:gradle:${Versions.androidGradle}"
val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
val mavenGradlePlugin = "com.github.dcendents:android-maven-gradle-plugin:2.1"
val bintrayGradlePlugin = "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
}

object Android {
Expand Down
4 changes: 4 additions & 0 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

plugins {
id("com.android.library")
id("com.github.dcendents.android-maven")
id("com.jfrog.bintray")
kotlin("android")
}

Expand All @@ -42,3 +44,5 @@ dependencies {
api(Libs.constraintLayout)
api(Libs.material)
}

apply(from = "../publish-android.gradle")
93 changes: 93 additions & 0 deletions publish-android.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
ext {
bintrayRepo = 'SimpleNumberPicker'
bintrayName = 'SimpleNumberPicker'

publishedGroupId = 'com.sbgapps'
libraryName = 'SimpleNumberPicker'
artifact = 'simplenumberpicker'

libraryDescription = 'A customisable decimal and hexadecimal material picker view for Android'

siteUrl = 'https://github.com/StephaneBg/SimpleNumberPicker'
gitUrl = 'https://github.com/StephaneBg/SimpleNumberPicker.git'

libraryVersion = '2.1.0'

developerId = 'stephanebg'
developerName = 'Stéphane Baiget'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

group = publishedGroupId
version = libraryVersion

install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

name libraryName
description libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

artifacts {
archives sourcesJar
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
dryRun = false
publish = true
override = false
publicDownloadNumbers = true
version {
desc = libraryDescription
}
}
}

0 comments on commit 9d47b69

Please sign in to comment.