Skip to content

Commit

Permalink
[Gradle Release Plugin] - pre tag commit: 'v0.5.2'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyvsmith committed Jul 12, 2016
1 parent fda14d1 commit 8d990b1
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 19 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
v0.5.2 - TBD
------------
v0.5.2 - 7/11/2016
------------------
### Fixed

- [Issue #31](https://github.com/uber/rides-android-sdk/issues/31) Multiple warnings "Ignoring InnerClasses attribute for an anonymous inner class" when building project


v0.5.1 - 6/7/2016
-----------------
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To use the Uber Rides Android SDK, add the compile dependency with the latest ve
Add the Uber Rides Android SDK to your `build.gradle`:
```gradle
dependencies {
compile 'com.uber.sdk:rides-android:0.5.1'
compile 'com.uber.sdk:rides-android:0.5.2'
}
```

Expand All @@ -31,7 +31,7 @@ In the `pom.xml` file:
<dependency>
<groupId>com.uber.sdk</groupId>
<artifactId>rides-android</artifactId>
<version>0.5.1</version>
<version>0.5.2</version>
</dependency>
```

Expand Down Expand Up @@ -128,15 +128,15 @@ RideParameters rideParams = new RideParameters.Builder()
.setDropoffLocation(37.795079f, -122.4397805f, "Embarcadero", "One Embarcadero Center, San Francisco") // Price estimate will only be provided if this is provided.
.setProductID("a1111c8c-c720-46c3-8534-2fcdd730040d") // Optional. If not provided, the cheapest product will be used.
.build();

SessionConfiguration config = new SessionConfiguration.Builder().setServerToken("YOUR_SERVER_TOKEN").build();
ServerTokenSession session = new ServerTokenSession(config);

RideRequestButtonCallback callback = new RideRequestButtonCallback() {

@Override
public void onRideInformationLoaded() {

}

@Override
Expand Down Expand Up @@ -246,7 +246,7 @@ The `RideRequestView` is like any other view you'd add to your app. Create a new
RideRequestView rideRequestView = new RideRequestView(context);

//Optionally set Session, will use default session from UberSDK otherwise
//rideRequestView.setSession(session);
//rideRequestView.setSession(session);

rideRequestView.setRideParameters(rideParameters)
rideRequestView.setRideRequestViewCallback(new RideRequestViewErrorCallback() {
Expand All @@ -272,7 +272,7 @@ Session session = loginManager.getSession();
Now create an instance of the `RidesService` using the `Session`

```java
RidesService service = UberRidesApi.with(session).createService();
RidesService service = UberRidesApi.with(session).createService();
```

### Sync vs. Async Calls
Expand Down Expand Up @@ -318,7 +318,7 @@ Sample apps can be found in the `samples` folder. Alternatively, you can also do

The Sample apps require configuration parameters to interact with the Uber API, these include the client id, redirect uri, and server token. They are provided on the [Uber developer dashboard](https://developer.uber.com/dashboard).

Specify your configuration parameters in the sample's gradle.properties file, where examples can be found adhering to the format `UBER_CLIENT_ID=insert_your_client_id_here`. These are generated into the BuildConfig during compilation.
Specify your configuration parameters in the sample's gradle.properties file, where examples can be found adhering to the format `UBER_CLIENT_ID=insert_your_client_id_here`. These are generated into the BuildConfig during compilation.

For a more idiomatic storage approach, define these in your home gradle.properties file to keep them out of the git repo.

Expand Down
2 changes: 1 addition & 1 deletion core-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ cobertura {
}

dependencies {
compile ('com.uber.sdk:rides:0.5.1') {
compile ('com.uber.sdk:rides:0.5.2') {
//Do not need Google OAuth based logic in Android
exclude module: 'slf4j-log4j12'
exclude module: 'google-oauth-client'
Expand Down
41 changes: 41 additions & 0 deletions core-android/proguard.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,54 @@
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontnote okhttp3.**

#retrofit2
-dontwarn retrofit2.**
-dontnote retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}

#Okio
-keep class okio.**
-keep interface okio.**
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**


#Moshi
-dontwarn com.squareup.moshi.**
-dontnote com.squareup.moshi.**
-keep class com.squareup.moshi.** { *; }
-keep interface com.squareup.moshi.** { *; }

-keepclassmembers class ** {
@com.squareup.moshi.FromJson *;
@com.squareup.moshi.ToJson *;
}

#Uber Java SDK
-dontwarn com.google.api.**
-keep class com.uber.sdk.rides.client.model.** { *; }
-keepattributes InnerClasses
-keepattributes EnclosingMethod


#Appcompat
-keep public class android.support.v7.widget.** { *; }
-keep public class android.support.v7.internal.widget.** { *; }
-keep public class android.support.v7.internal.view.menu.** { *; }

-keep public class * extends android.support.v4.view.ActionProvider {
public <init>(android.content.Context);
}

#Android
-dontnote android.support.v4.**
-dontnote android.support.v7.**
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ group=com.uber.sdk
groupId=com.uber.sdk
artifactId=rides-android
githubDownloadPrefix=https://github.com/uber/rides-android-sdk/releases/download/
version=0.5.2-SNAPSHOT
version=0.5.2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.uber.sdk.android.rides.RideParameters;
import com.uber.sdk.android.rides.RideRequestButtonCallback;
import com.uber.sdk.rides.client.error.ApiError;
import com.uber.sdk.rides.client.internal.PrimitiveAdapter;
import com.uber.sdk.rides.client.model.PriceEstimate;
import com.uber.sdk.rides.client.model.PriceEstimatesResponse;
import com.uber.sdk.rides.client.model.TimeEstimate;
Expand Down Expand Up @@ -136,7 +135,6 @@ public void setUp() throws Exception {
.build();

Moshi moshi = new Moshi.Builder()
.add(new PrimitiveAdapter())
.build();

okHttpClient = new OkHttpClient.Builder()
Expand Down Expand Up @@ -627,4 +625,4 @@ private static void stubTimeApi(ResponseDefinitionBuilder responseBuilder) {
.withQueryParam("start_longitude", equalTo(String.valueOf(PICKUP_LONGITUDE)))
.willReturn(responseBuilder));
}
}
}
7 changes: 5 additions & 2 deletions samples/login-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ android {
buildConfigField "String", "CLIENT_ID", "\"${loadSecret("UBER_CLIENT_ID")}\"" //Add your client id to gradle.properties
buildConfigField "String", "REDIRECT_URI", "\"${loadSecret("UBER_REDIRECT_URI")}\"" //Add your redirect uri to gradle.properties
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')

}
}
}


dependencies {
compile 'com.android.support:appcompat-v7:23.0.1'
compile project(':core-android')
Expand Down
7 changes: 4 additions & 3 deletions samples/request-button-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ android {
buildConfigField "String", "REDIRECT_URI", "\"${loadSecret("UBER_REDIRECT_URI")}\"" //Add your redirect uri to gradle.properties
buildConfigField "String", "SERVER_TOKEN", "\"${loadSecret("UBER_SERVER_TOKEN")}\"" //Add your server token to gradle.properties
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
}
Expand All @@ -49,4 +50,4 @@ dependencies {
*/
def loadSecret(String name) {
return hasProperty(name) ? getProperty(name) : "MISSING"
}
}

0 comments on commit 8d990b1

Please sign in to comment.