Skip to content

Commit

Permalink
Bump Retrofit version to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyZaitsev committed Mar 24, 2016
1 parent 19912a0 commit 1a7db71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ChangeableBaseUrl provideChangeableBaseUrl() {
@Provides @NonNull @Singleton
public QualityMattersRestApi provideQualityMattersApi(@NonNull OkHttpClient okHttpClient, @NonNull ObjectMapper objectMapper, @NonNull ChangeableBaseUrl changeableBaseUrl) {
return new Retrofit.Builder()
.baseUrl(changeableBaseUrl)
.baseUrl(changeableBaseUrl.url())
.client(okHttpClient)
.addConverterFactory(JacksonConverterFactory.create(objectMapper))
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
import java.util.concurrent.atomic.AtomicReference;

import okhttp3.HttpUrl;
import retrofit2.BaseUrl;

/**
* Such implementation allows us easily change base url in the integration and functional tests!
*/
public class ChangeableBaseUrl implements BaseUrl {
public class ChangeableBaseUrl {

@NonNull
private final AtomicReference<HttpUrl> baseUrl;
Expand All @@ -23,7 +22,7 @@ public void setBaseUrl(@NonNull String baseUrl) {
this.baseUrl.set(HttpUrl.parse(baseUrl));
}

@Override @NonNull
@NonNull
public HttpUrl url() {
return baseUrl.get();
}
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ext.versions = [
rxJava : '1.1.2',
supportLibs : '23.1.1',
okHttp : '3.2.0',
retrofit : '2.0.0-beta4',
retrofit : '2.0.0',
jackson : '2.6.3',
autoValue : '1.2-rc1',
butterKnife : '7.0.1',
Expand Down

0 comments on commit 1a7db71

Please sign in to comment.