Skip to content

Commit 066a1de

Browse files
authored
Merge pull request #56 from lalwani/gradle
switching to mavenCentral since jcenter is not operational anymore
2 parents 35b0c18 + c6cbcc1 commit 066a1de

File tree

6 files changed

+93
-46
lines changed

6 files changed

+93
-46
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77

88
name: Java CI with Gradle
99

10-
on:
11-
push:
12-
branches: [ "master" ]
13-
pull_request:
14-
branches: [ "master" ]
10+
on: [push, pull_request]
1511

1612
permissions:
1713
contents: read

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
apply from: 'gradle/dependencies.gradle'
1919

2020
repositories {
21-
jcenter()
21+
mavenCentral()
2222
maven { url deps.build.repositories.plugins }
2323
}
2424
dependencies {

gradle/verification.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
subprojects {
1818
buildscript {
1919
repositories {
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}
2323

2424
repositories {
25-
jcenter()
25+
mavenCentral()
2626
maven {
2727
url 'https://maven.google.com'
2828
}

samples/servlet-sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sourceCompatibility = JavaVersion.VERSION_1_7
2828
mainClassName = 'com.uber.sdk.rides.samples.servlet.Server'
2929

3030
repositories {
31-
jcenter()
31+
mavenCentral()
3232
}
3333

3434
dependencies {

uber-core/build.gradle

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
buildscript {
2323
repositories {
24-
jcenter()
24+
mavenCentral()
2525
maven { url deps.build.repositories.plugins }
2626
}
2727
dependencies {
@@ -43,21 +43,20 @@ buildConfig {
4343
}
4444

4545
dependencies {
46+
compile deps.network.retrofit
47+
compile deps.network.retrofitMoshiConverter
48+
compile deps.network.moshi
49+
compile deps.network.okhttp
50+
compile deps.network.okhttpLoggingInterceptor
51+
compile deps.misc.jsr305
4652

47-
implementation deps.network.retrofit
48-
implementation deps.network.retrofitMoshiConverter
49-
implementation deps.network.moshi
50-
implementation deps.network.okhttp
51-
implementation deps.network.okhttpLoggingInterceptor
52-
implementation deps.misc.jsr305
53-
54-
testImplementation deps.test.junit
55-
testImplementation deps.test.assertj
56-
testImplementation deps.test.mockito
57-
testImplementation deps.test.hamcrest
58-
testImplementation deps.test.wiremock
59-
testImplementation deps.network.retrofit
60-
testImplementation deps.network.okhttp
53+
testCompile deps.test.junit
54+
testCompile deps.test.assertj
55+
testCompile deps.test.mockito
56+
testCompile deps.test.hamcrest
57+
testCompile deps.test.wiremock
58+
testCompile deps.network.retrofit
59+
testCompile deps.network.okhttp
6160
}
6261

6362
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')

uber-core/src/main/java/com/uber/sdk/core/auth/ProfileHint.java

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,55 @@
66

77
import javax.annotation.Nonnull;
88

9-
public class ProfileHint implements Serializable {
10-
11-
@Json(name = "first_name")
12-
private final String firstName;
13-
@Json(name = "last_name")
14-
private final String lastName;
15-
@Json(name = "email")
16-
private final String email;
17-
@Json(name = "phone")
18-
private final String phone;
19-
20-
private ProfileHint(
21-
String firstName,
22-
String lastName,
23-
String email,
24-
String phone) {
25-
this.firstName = firstName;
26-
this.lastName = lastName;
27-
this.email = email;
28-
this.phone = phone;
29-
}
30-
9+
/**
10+
* {@Link #ProfileHint} is builder to setup user's personal information like phone number, email
11+
* firstName and lastName
12+
*/
13+
final public class ProfileHint implements Serializable {
14+
/**
15+
* Builder class for {@link ProfileHint}
16+
*/
3117
public static class Builder {
3218
private String firstName;
3319
private String lastName;
3420
private String email;
3521
private String phone;
22+
23+
/**
24+
* Set first name
25+
*
26+
* @param firstName first name of the user
27+
*/
3628
public Builder firstName(@Nonnull String firstName) {
3729
this.firstName = firstName;
3830
return this;
3931
}
4032

33+
/**
34+
* Set last name
35+
*
36+
* @param lastName last name of the user
37+
*/
4138
public Builder lastName(@Nonnull String lastName) {
4239
this.lastName = lastName;
4340
return this;
4441
}
4542

43+
/**
44+
* Set email address
45+
*
46+
* @param email email address of the user
47+
*/
4648
public Builder email(@Nonnull String email) {
4749
this.email = email;
4850
return this;
4951
}
5052

53+
/**
54+
* Set phone number as a string including country code
55+
*
56+
* @param phone phone number of the user
57+
*/
5158
public Builder phone(@Nonnull String phone) {
5259
this.phone = phone;
5360
return this;
@@ -63,27 +70,72 @@ public ProfileHint build() {
6370
}
6471
}
6572

73+
/**
74+
* Gets the first name of the user
75+
*
76+
* @return The first name of the user if set, null otherwise
77+
*/
6678
public String getFirstName() {
6779
return firstName;
6880
}
6981

82+
/**
83+
* Gets the last name of the user
84+
*
85+
* @return The last name of the user if set, null otherwise
86+
*/
7087
public String getLastName() {
7188
return lastName;
7289
}
7390

91+
/**
92+
* Gets the email address of the user
93+
*
94+
* @return The email address of the user if set, null otherwise
95+
*/
7496
public String getEmail() {
7597
return email;
7698
}
7799

100+
/**
101+
* Gets the phone number of the user as a string including country code
102+
*
103+
* @return The phone number of the user if set, null otherwise
104+
*/
78105
public String getPhone() {
79106
return phone;
80107
}
81108

109+
/**
110+
* Returns new Builder with the current instance's properties as default values
111+
*
112+
* @return a new Builder object
113+
*/
82114
public Builder newBuilder() {
83115
return new Builder()
84116
.firstName(firstName)
85117
.lastName(lastName)
86118
.email(email)
87119
.phone(phone);
88120
}
121+
122+
@Json(name = "first_name")
123+
private final String firstName;
124+
@Json(name = "last_name")
125+
private final String lastName;
126+
@Json(name = "email")
127+
private final String email;
128+
@Json(name = "phone")
129+
private final String phone;
130+
131+
private ProfileHint(
132+
String firstName,
133+
String lastName,
134+
String email,
135+
String phone) {
136+
this.firstName = firstName;
137+
this.lastName = lastName;
138+
this.email = email;
139+
this.phone = phone;
140+
}
89141
}

0 commit comments

Comments
 (0)