Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Add library to bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
Galarzaa90 committed Mar 30, 2017
1 parent 5c5e342 commit 3d33adb
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@ An Android Things libray to control RFID readers based on the RC522 readers.

Based on [pi-rc522](https://github.com/ondryaso/pi-rc522) by user **ondryaso**


## Connections
The connections vary based on the [board](https://developer.android.com/things/hardware/developer-kits.html) used.

**RST** and **IRQ** pins can be configured programatically.

## Installing
This library is available at Bintray. To install add this to your module's build.gradle
```groovy
repositories {
maven {
url 'http://dl.bintray.com/galarzaa90/maven/'
}
}
dependencies {
compile 'com.galarzaa.android-things:rc522:0.1.0'
}
```

## Usage
_The use of interruptions hasn't been tested._

Expand Down
61 changes: 61 additions & 0 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apply plugin: 'com.jfrog.bintray'

version = libraryVersion

if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

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

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

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
issueTrackerUrl = issuesUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:'+versions.gradleVersion
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

Expand Down
42 changes: 42 additions & 0 deletions pom.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apply plugin: 'com.github.dcendents.android-maven'

group = publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

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

}
}
}
}
}
28 changes: 28 additions & 0 deletions rc522/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@ apply from: '../dependencies.gradle'

apply plugin: 'com.android.library'

ext {
bintrayRepo = 'maven'
bintrayName = 'android-things-rc522'

publishedGroupId = 'com.galarzaa.android-things'
libraryName = 'Android Things RC522'
artifact = 'rc522'

libraryDescription = 'Android library to communicate with RFID Module RC522'

siteUrl = 'https://github.com/Galarzaa90/android-things-rc522'
gitUrl = 'https://github.com/Galarzaa90/android-things-rc522.git'
issuesUrl = 'https://github.com/Galarzaa90/android-things-rc522/issues'

libraryVersion = '0.1.0'

developerId = 'galarzaa90'
developerName = 'Allan Galarza'
developerEmail = 'allan.galarza@gmail.com'

licenseName = 'MIT License'
licenseUrl = 'https://raw.githubusercontent.com/Galarzaa90/android-things-rc522/master/LICENSE.md'
allLicenses = ["MIT"]
}

android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
Expand All @@ -24,3 +49,6 @@ android {
dependencies {
compile 'com.google.android.things:androidthings:'+versions.thingsLib
}

apply from: '../bintray.gradle'
apply from: '../pom.gradle'

0 comments on commit 3d33adb

Please sign in to comment.