Skip to content

Commit

Permalink
Dependencies update, reformat, and fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
domesticmouse committed Sep 24, 2018
1 parent d9d988f commit 6912dbc
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ artifacts {
}

dependencies {
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compileOnly 'com.google.appengine:appengine-api-1.0-sdk:1.9.54'
compile 'org.slf4j:slf4j-api:1.7.25'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
testCompile 'org.apache.httpcomponents:httpclient:4.5.3'
testCompile 'org.slf4j:slf4j-simple:1.7.25'
testCompile 'commons-lang:commons-lang:2.6'
testCompile 'org.json:json:20170516'
compileOnly 'com.google.appengine:appengine-api-1.0-sdk:1.9.65'
api 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.slf4j:slf4j-api:1.7.25'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.22.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.11.0'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.6'
testImplementation 'org.slf4j:slf4j-simple:1.7.25'
testImplementation 'commons-lang:commons-lang:2.6'
testImplementation 'org.json:json:20180813'
}

task updateVersion(type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.2.12-SNAPSHOT
version=0.9.0-SNAPSHOT

# variables required to allow build.gradle to parse,
# override in ~/.gradle/gradle.properties
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
1 change: 0 additions & 1 deletion src/main/java/com/google/maps/DirectionsApiRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.google.maps.model.TransitRoutingPreference;
import com.google.maps.model.TravelMode;
import com.google.maps.model.Unit;

import java.time.Instant;

/** Request for the Directions API. */
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/google/maps/internal/DateTimeAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public LocalDateTime read(JsonReader reader) throws IOException {
}
reader.endObject();

return LocalDateTime.ofInstant(Instant.ofEpochMilli(secondsSinceEpoch * 1000), ZoneId.of(timeZoneId));
return LocalDateTime.ofInstant(
Instant.ofEpochMilli(secondsSinceEpoch * 1000), ZoneId.of(timeZoneId));
}

/** This method is not implemented. */
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/com/google/maps/DirectionsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import com.google.maps.model.TransitRoutingPreference;
import com.google.maps.model.TravelMode;
import com.google.maps.model.Unit;

import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -352,7 +350,7 @@ public void testTrafficModel() throws Exception {
.origin("48 Pirrama Road, Pyrmont NSW 2009")
.destination("182 Church St, Parramatta NSW 2150")
.mode(TravelMode.DRIVING)
.departureTime(new DateTime().plus(Duration.standardMinutes(2)))
.departureTime(Instant.now().plus(Duration.ofMinutes(2)))
.trafficModel(TrafficModel.PESSIMISTIC)
.await();

Expand Down
10 changes: 5 additions & 5 deletions src/test/java/com/google/maps/DistanceMatrixApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
import com.google.maps.model.TrafficModel;
import com.google.maps.model.TravelMode;
import com.google.maps.model.Unit;
import java.time.Duration;
import java.time.Instant;
import java.util.Arrays;
import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.time.Duration;
import java.time.Instant;

@Category(MediumTests.class)
public class DistanceMatrixApiTest {

Expand Down Expand Up @@ -134,8 +133,9 @@ public void testNewRequestWithAllPossibleParams() throws Exception {
.language("en-AU")
.avoid(RouteRestriction.TOLLS)
.units(Unit.IMPERIAL)
.departureTime(Instant.now().plus(Duration.ofMinutes(2))) // this is ignored when an API key is used
.await();
.departureTime(
Instant.now().plus(Duration.ofMinutes(2))) // this is ignored when an API key is used
.await();

sc.assertParamValue(StringUtils.join(origins, "|"), "origins");
sc.assertParamValue(StringUtils.join(destinations, "|"), "destinations");
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/com/google/maps/PlacesApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ public void testPlaceDetailsLookupGoogleSydney() throws Exception {
assertEquals(1425790392, review.time.toEpochMilli() / 1000);
assertEquals(
"2015-03-08 04:53AM",
DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mma").withZone(ZoneOffset.UTC).format(review.time));
DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mma")
.withZone(ZoneOffset.UTC)
.format(review.time));

// Place ID
assertNotNull(placeDetails.placeId);
Expand Down

0 comments on commit 6912dbc

Please sign in to comment.