Skip to content

Commit

Permalink
[Gradle Release Plugin] - pre tag commit: 'v0.7.0'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyvsmith committed Oct 27, 2017
1 parent 80c44b9 commit 30debce
Show file tree
Hide file tree
Showing 117 changed files with 1,605 additions and 99 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
v0.6.1 - TBD
v0.7.0 - TBD
------------
This release refactors the SDK binary into three binaries and deprecates the previous one. This is a breaking change for imports for the majority of classes as we prepare for the 1.0 roadmap release with a stable API. This allows downstream dependencies to be able to avoid the oauth-client library dependency.

Check the [README](https://github.com/uber/rides-java-sdk/blob/master/README.md) for the latest integration instructions to update your gradle/maven dependency.

### Breaking
- Refactored SDK into three modules, uber-core, uber-rides, and uber-core-oauth-client-adapter. [Issue #34](https://github.com/uber/rides-java-sdk/issues/34)
- Repackaged com.uber.sdk.rides.auth.* classes to com.uber.sdk.core.auth.*
- Repackaged com.uber.sdk.rides.client.[AccessTokenSession, ServerTokenSession, Session, SessionConfiguration] to com.uber.sdk.core.client.*
- Moved Maven Artifact ID from 'sdk' to 'uber-rides', 'uber-core-oauth-client-adapter', and 'uber-core'. Old binary will no longer be updated.

v0.6.0 - 11/11/2016
------------
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Note: Using Android? Be sure to checkout the [Uber Android SDK](github.com/uber/
If using Gradle, add this to your project’s `build.gradle` file:
```gradle
dependencies {
compile 'com.uber.sdk:rides:0.6.0'
compile 'com.uber.sdk:uber-rides:0.7.0'
compile 'com.uber.sdk:uber-core-oauth-client-adapter:0.7.0'
}
```

Expand All @@ -23,8 +24,14 @@ If using Maven, add this to your project's `pom.xml` file:
```xml
<dependency>
<groupId>com.uber.sdk</groupId>
<artifactId>rides</artifactId>
<version>0.6.0</version>
<artifactId>uber-rides</artifactId>
<version>0.7.0</version>
</dependency>

<dependency>
<groupId>com.uber.sdk</groupId>
<artifactId>uber-core-oauth-client-adapter</artifactId>
<version>0.7.0</version>
</dependency>
```

Expand Down
19 changes: 11 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ task updateChangelog() << {
}
}

afterReleaseBuild.dependsOn ':sdk:uploadArchives'
afterReleaseBuild.dependsOn ( ':uber-core:uploadArchives',
':uber-core-oauth-client-adapter:uploadArchives',
':uber-rides:uploadArchives')
updateVersion.dependsOn ':githubRelease'
commitNewVersion.dependsOn ':updateChangelog'
githubRelease.dependsOn project(':samples').subprojects.collect { it.path + ':githubReleaseZip' }
Expand Down Expand Up @@ -218,14 +220,15 @@ distributions {
line.replaceAll('@version@', unsnapshottedVersion)
}
}

from('sdk') {
filter { String line ->
line.replaceAll('@version@', unsnapshottedVersion)
['uber-core', 'uber-core-oauth-client-adapter', 'uber-rides'].each { folder ->
from(folder) {
filter { String line ->
line.replaceAll('@version@', unsnapshottedVersion)
}
exclude 'build'
exclude '*.iml'
into folder
}
exclude 'build'
exclude '*.iml'
into 'sdk'
}

from('samples') {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@

group=com.uber.sdk
groupId=com.uber.sdk
artifactId=rides
githubDownloadPrefix=https://github.com/uber/rides-java-sdk/releases/download/
version=0.6.1-SNAPSHOT
version=0.7.0
13 changes: 11 additions & 2 deletions samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,17 @@ subprojects {

from('.') {
filter { String line ->
line.replaceAll("compile project\\(':sdk'\\)",
"compile '${groupId}:${artifactId}:${unsnapshottedVersion}'")
line.replaceAll("compile project\\(':uber-core'\\)",
"compile '${groupId}:uber-core:${unsnapshottedVersion}'")
}
filter { String line ->
line.replaceAll("compile project\\(':uber-core-oauth-client-adapter'\\)",
"compile '${groupId}:uber-core-oauth-client-adapter:${unsnapshottedVersion}'")
}

filter { String line ->
line.replaceAll("compile project\\(':uber-rides'\\)",
"compile '${groupId}:uber-rides:${unsnapshottedVersion}'")
}
into '.'
exclude 'build'
Expand Down
3 changes: 2 additions & 1 deletion samples/cmdline-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ This is a beta Java SDK not intended to be run on Android. An official Android S

First, add your client ID and secret retrieved from developer.uber.com to `src/main/resources/secrets.properties`.

To run the command line sample, run `$ ./gradlew clean build run`. You may need to add the redirect URL to your application (at developer.uber.com) for OAuth2 to succeed.
To run the command line sample, run `$ ./gradlew clean :samples:cmdline-sample:build :samples:cmdline-sample:run`. You
may need to add the redirect URL to your application (at developer.uber.com) for OAuth2 to succeed.

Running the sample will store user credentials in your home directory under `.uber_credentials` for future executions.

Expand Down
3 changes: 2 additions & 1 deletion samples/cmdline-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ repositories {
}

dependencies {
compile project(':sdk')
compile project(':uber-core-oauth-client-adapter')
compile project(':uber-rides')
compile 'com.google.oauth-client:google-oauth-client-jetty:1.19.0'
compile 'com.google.oauth-client:google-oauth-client-servlet:1.19.0'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.util.store.AbstractDataStoreFactory;
import com.google.api.client.util.store.FileDataStoreFactory;
import com.uber.sdk.rides.auth.OAuth2Credentials;
import com.uber.sdk.rides.client.CredentialsSession;
import com.uber.sdk.rides.client.SessionConfiguration;
import com.uber.sdk.core.auth.OAuth2Credentials;
import com.uber.sdk.core.client.CredentialsSession;
import com.uber.sdk.core.client.SessionConfiguration;
import com.uber.sdk.rides.client.services.RidesService;
import com.uber.sdk.rides.client.UberRidesApi;
import com.uber.sdk.rides.client.error.ApiError;
import com.uber.sdk.rides.client.error.ClientError;
import com.uber.sdk.rides.client.error.ErrorParser;
import com.uber.sdk.rides.client.model.UserProfile;
import com.uber.sdk.rides.client.services.RidesService;

import java.io.File;
import java.io.FileReader;
Expand Down
11 changes: 8 additions & 3 deletions samples/servlet-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ This is a beta Java SDK not intended to be run on Android. An official Android S

First, add your client ID and secret retrieved from developer.uber.com to `src/main/resources/secrets.properties`.

To run the servlet sample, run `$ ./gradlew clean build run`. You may need to add the redirect URL (http://localhost:8181/Callback) to your application (at developer.uber.com) for OAuth2 to succeed.
To run the servlet sample, run `$ ./gradlew clean :samples:servlet-sample:build :samples:servlet-sample:run`. You may
need to add the redirect URL (http://localhost:8181/Callback) to your application (at developer.uber.com)
for OAuth2 to succeed.

For full documentation, visit our [Developer Site](https://developer.uber.com/v1/endpoints/).

## Getting help

Uber developers actively monitor the [uber tag](http://stackoverflow.com/questions/tagged/uber-api) on StackOverflow. If you need help installing or using the library, you can ask a question there. Make sure to tag your question with `uber-api` and `java`!
Uber developers actively monitor the [uber tag](http://stackoverflow.com/questions/tagged/uber-api) on StackOverflow.
If you need help installing or using the library, you can ask a question there. Make sure to tag your question
with `uber-api` and `java`!

## Contributing

We :heart: contributions. If you've found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo. Write a test to show your bug was fixed or the feature works as expected.
We :heart: contributions. If you've found a bug in the library or would like new features added, go ahead and open
issues or pull requests against this repo. Write a test to show your bug was fixed or the feature works as expected.
3 changes: 2 additions & 1 deletion samples/servlet-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ repositories {
}

dependencies {
compile project(':sdk')
compile project(':uber-core-oauth-client-adapter')
compile project(':uber-rides')
compile 'com.google.oauth-client:google-oauth-client-jetty:1.19.0'
compile 'com.google.oauth-client:google-oauth-client-servlet:1.19.0'
compile 'org.eclipse.jetty:jetty-server:9.2.10.v20150310'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
package com.uber.sdk.rides.samples.servlet;

import com.google.api.client.auth.oauth2.AuthorizationCodeResponseUrl;
import com.uber.sdk.rides.auth.OAuth2Credentials;
import com.uber.sdk.rides.client.SessionConfiguration;
import com.uber.sdk.core.auth.OAuth2Credentials;
import com.uber.sdk.core.client.SessionConfiguration;

import java.io.IOException;
import java.util.Random;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
package com.uber.sdk.rides.samples.servlet;

import com.google.api.client.auth.oauth2.Credential;
import com.uber.sdk.rides.auth.OAuth2Credentials;
import com.uber.sdk.rides.client.CredentialsSession;
import com.uber.sdk.rides.client.SessionConfiguration;
import com.uber.sdk.core.auth.OAuth2Credentials;
import com.uber.sdk.core.client.CredentialsSession;
import com.uber.sdk.core.client.SessionConfiguration;
import com.uber.sdk.rides.client.services.RidesService;
import com.uber.sdk.rides.client.UberRidesApi;
import com.uber.sdk.rides.client.model.UserProfile;
import com.uber.sdk.rides.client.services.RidesService;

import java.io.IOException;
import java.util.Random;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
package com.uber.sdk.rides.samples.servlet;

import com.google.api.client.util.store.MemoryDataStoreFactory;
import com.uber.sdk.core.auth.OAuth2Credentials;
import com.uber.sdk.core.auth.Scope;
import com.uber.sdk.rides.auth.OAuth2Credentials;
import com.uber.sdk.rides.client.SessionConfiguration;
import com.uber.sdk.core.client.SessionConfiguration;

import org.eclipse.jetty.servlet.ServletContextHandler;

Expand Down
5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
* THE SOFTWARE.
*/

include ':sdk'
include ':uber-core'
include ':uber-core-oauth-client-adapter'
include ':uber-rides'
include ':samples'
include ':samples:cmdline-sample'
include ':samples:servlet-sample'

140 changes: 140 additions & 0 deletions uber-core-oauth-client-adapter/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* Copyright (c) 2016 Uber Technologies, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'

targetCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_1_7

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 sourcesJar
archives javadocJar
}

signing {
sign configurations.archives
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
return hasProperty('ossrhUsername') ? ossrhUsername : ""
}

def getRepositoryPassword() {
return hasProperty('ossrhPassword') ? ossrhPassword : ""
}


uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

pom.project {
name POM_NAME
packaging 'jar'
artifactId artifactId

description 'The official Java SDK (beta) for the Uber Rides API.'
url 'https://developer.uber.com'

scm {
connection 'scm:git:git@github.com:uber/rides-java-sdk.git'
developerConnection 'scm:git:git@github.com:uber/rides-java-sdk.git'
url 'git@github.com:uber/rides-java-sdk.git'
}

licenses {
license {
name 'MIT License'
url 'http://www.opensource.org/licenses/mit-license.php'
}
}

developers {
developer {
id 'arogal'
name 'Adam Rogal'
email 'arogal@uber.com'
}

developer {
id 'itstexter'
name 'Alex Texter'
email 'texter@uber.com'
}

developer {
id 'tyvsmith'
name 'Ty Smith'
email 'tys@uber.com'
}
}
}
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile project(':uber-core')
compile 'com.google.http-client:google-http-client-jackson2:1.19.0'
compile 'com.google.oauth-client:google-oauth-client:1.19.0'

testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.1'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:1.10.8'

testCompile 'com.github.tomakehurst:wiremock:2.1.0-beta'
}
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions uber-core-oauth-client-adapter/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2016 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

POM_NAME=Uber Java Core Oauth-Client Adapter SDK
artifactId=uber-core-oauth-client-adapter

0 comments on commit 30debce

Please sign in to comment.