Skip to content

Commit

Permalink
* 去除无用jar包 减少体积
Browse files Browse the repository at this point in the history
  • Loading branch information
eajon authored and wengyijiong committed Jan 31, 2019
1 parent 20bb809 commit fe1a540
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 3 additions & 8 deletions RxHttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,17 @@ dependencies {
//retrofit
api 'com.squareup.retrofit2:retrofit:2.5.0'
api 'com.squareup.retrofit2:converter-gson:2.5.0'
api 'com.squareup.retrofit2:converter-scalars:2.5.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'

//okhttp 拦截器
api 'com.squareup.okhttp3:logging-interceptor:3.12.0'

//lifecycle
api 'com.trello.rxlifecycle3:rxlifecycle-components:3.0.0'


//rxjava
api 'io.reactivex.rxjava2:rxjava:2.2.6'
api 'io.reactivex.rxjava2:rxandroid:2.1.0'
api 'io.reactivex.rxjava2:rxjava:2.2.3'
api 'com.jakewharton.rxrelay2:rxrelay:2.1.0'

//disklrucache
api 'com.jakewharton:disklrucache:2.0.2'
api 'com.google.code.gson:gson:2.8.5'
//logger
api 'com.orhanobut:logger:2.2.0'

Expand Down
3 changes: 0 additions & 3 deletions RxHttp/src/main/java/com/github/eajon/util/RetrofitUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;

/**
* Retrofit工具类
Expand Down Expand Up @@ -47,7 +46,6 @@ public Api getRetrofit(String baseUrl) {
retrofit
.client(RxHttp.getConfig().getOkHttpClient())
.baseUrl(baseUrl)
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create());
return retrofit.build().create(Api.class);
Expand All @@ -64,7 +62,6 @@ public Api getRetrofit(String baseUrl, Interceptor... interceptorArray) {
retrofit
.client(OkHttpUtils.getOkHttpClient(interceptorArray))
.baseUrl(baseUrl)
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create());
return retrofit.build().create(Api.class);
Expand Down

0 comments on commit fe1a540

Please sign in to comment.