Skip to content

Commit

Permalink
Merge pull request #22 from eyedol/9-make-way-for-release
Browse files Browse the repository at this point in the history
9 make way for release
  • Loading branch information
eyedol committed Mar 25, 2016
2 parents 74802d6 + ddfea59 commit 6cd252e
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 24 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## v0.1.0
_2016-03-25_

* Implements create subscriber.
* Implements create bulk subscriber.
* Implements list subscribers.
* Implements modify subscribers.
* Implements delete subscriber.
* Add sample code showing how to use the different API clients.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ It comes with three independent modules:
- Asynchronous module; Access the API asynchronously
- RxJava module; Access the API using RxJava

**Note:** These are not official libraries from the VOTO team.

###<a name="Setup">**Setup**
Add gradle dependency:

Expand All @@ -22,21 +24,21 @@ repositories {
Synchronous module:
```groovy
dependencies {
compile 'com.addhen:voto.sdk.sync:0.1.0'
compile 'com.addhen:voto-sdk-sync:0.1.0'
}
```

Asynchronous module:
```groovy
dependencies {
compile 'com.addhen:voto.sdk.async:0.1.0'
compile 'com.addhen:voto-sdk-async:0.1.0'
}
```

RxJava module:
```groovy
dependencies {
compile 'com.addhen:voto.sdk.rxjava:0.1.0'
compile 'com.addhen:voto-sdk-rxjava:0.1.0'
}
```
### Usage
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ buildscript {
}

dependencies {
classpath 'com.novoda:bintray-release:0.3.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}

Expand Down
111 changes: 100 additions & 11 deletions gradle-config/bintray-upload.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,101 @@
// Upload artifact to bintray repo
publish {
groupId = 'com.addhen'
artifactId = artifact
publishVersion = project.parent.version
desc = description
licences = ['Apache-2.0']
website = 'https://github.com/eyedol/voto-java-sdk'
autoPublish = true
bintrayUser = project.hasProperty("bintray.user") ? bintray.user : "";
bintrayKey = project.hasProperty("bintray.apikey") ? bintray.apikey : "";
// Upload artifact to bintray
def siteUrl = 'https://github.com/eyedol/voto-java-sdk' // Homepage URL of the library
def gitUrl = 'https://eyedol@github.com/eyedol/voto-java-sdk.git' // Git repository URL
def issueUrl = 'https://github.com/eyedol/voto-java-sdk/issues/'
group = "com.addhen" // Maven Group ID for the artifact

def libVersion = project.parent.version.toString()

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'jar'
// Add your description here
name artifact.toString()
description = blob
url siteUrl
// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'eyedol'
name 'Henry Addo'
email 'henry@addhen.org'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}

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

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

artifacts {
archives javadocJar
archives sourcesJar
}

Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

// https://github.com/bintray/gradle-bintray-plugin
bintray {
user = properties.getProperty("bintray.user", "")
key = properties.getProperty("bintray.apikey", "")
configurations = ['archives']
pkg {
repo = "maven"
// it is the name that appears in bintray when logged
name = artifact
websiteUrl = siteUrl
vcsUrl = gitUrl
issueTrackerUrl = issueUrl
licenses = ["Apache-2.0"]
labels = ['android', 'java', 'voto', 'sdk', 'api']
publicDownloadNumbers = true
publish = true
desc = blob
githubRepo = 'eyedol/voto-java-sdk' //Optional Github repository
githubReleaseNotesFile = 'CHANGELOG.md'
version {
name = libVersion
vcsTag = libVersion
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'
}
mavenCentralSync {
sync = true
//Optional (true by default). Determines whether to sync the version to Maven Central.
user = properties.getProperty("bintray.oss.user", "") //OSS user token
password = properties.getProperty("bintray.oss.password", "") //OSS user password
close = '1'
//Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
}
}
}
}
7 changes: 4 additions & 3 deletions voto-async/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'java'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: '../gradle-config/quality.gradle'
apply from: '../gradle-config/jacoco-codecoverage.gradle'

Expand All @@ -11,7 +12,7 @@ dependencies {

// Upload artifact to bintray repo
ext {
artifact = 'voto.sdk.async'
description = 'Provides access to the VOTO API asynchronously'
artifact = 'voto-sdk-async'
blob = 'Provides access to the VOTO API asynchronously'
}
apply from: '../gradle-config/bintray-upload.gradle'
7 changes: 4 additions & 3 deletions voto-rxjava/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'java'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: '../gradle-config/quality.gradle'
apply from: '../gradle-config/jacoco-codecoverage.gradle'

Expand All @@ -14,8 +15,8 @@ dependencies {

// Upload artifact to bintray repo
ext {
artifact = 'voto.sdk.rxjava'
description = 'Uses RxJava for accessing the VOTO API'
artifact = 'voto-sdk-rxjava'
blob = 'Uses RxJava for accessing the VOTO API'
}
// Upload artifact to bintray repo
apply from: '../gradle-config/bintray-upload.gradle'
7 changes: 4 additions & 3 deletions voto-sync/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'java'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: '../gradle-config/quality.gradle'
apply from: '../gradle-config/jacoco-codecoverage.gradle'

Expand All @@ -12,8 +13,8 @@ dependencies {
}

ext {
artifact = 'voto.sdk.sync'
description = 'Provides access to the VOTO API synchronously'
artifact = 'voto-sdk-sync'
blob = 'Provides access to the VOTO API synchronously'
}
// Upload artifact to bintray repo
apply from: '../gradle-config/bintray-upload.gradle'

0 comments on commit 6cd252e

Please sign in to comment.