Skip to content

Commit

Permalink
api与action合并
Browse files Browse the repository at this point in the history
  • Loading branch information
K0170016 authored and K0170016 committed Jun 21, 2019
1 parent 8ecb9f3 commit 308216b
Show file tree
Hide file tree
Showing 22 changed files with 199 additions and 412 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
.gradle
.idea
/captures
/build
/release
/local.properties
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
- Kotlin拓展 [**Anko**](https://github.com/Kotlin/anko)
- RxJava自动注销 [**AutoDispose**](https://github.com/uber/AutoDispose)
- AndroidX [**X-Room**](https://mvnrepository.com/artifact/androidx.room/room-runtime)
+[**X-Paging**](https://mvnrepository.com/artifact/androidx.paging/paging-runtime-ktx)
+[**X-Work**](https://mvnrepository.com/artifact/androidx.work/work-runtime-ktx)
+[**X-Navigation**](https://mvnrepository.com/artifact/androidx.navigation/navigation-runtime)
+[**X-Multidex**](https://mvnrepository.com/artifact/androidx.multidex/multidex)
+[**X-Fragment**](https://mvnrepository.com/artifact/androidx.fragment/fragment)
Expand Down
31 changes: 22 additions & 9 deletions depend_common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ dependencies {
implementation "com.github.coolfire2015:RxFluxImage:${RX_FLUX_IMAGE}"
//X-Core
implementation "androidx.core:core-ktx:${X_CORE}"
//X-Fragment
implementation "androidx.fragment:fragment-ktx:${X_FRAGMENT}"
//X-Lifecycle
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${X_LIFECYCLE}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${X_LIFECYCLE}"
//X-Navigation
implementation "androidx.navigation:navigation-ui-ktx:${X_NAVIGATION}"
implementation "androidx.navigation:navigation-fragment-ktx:${X_NAVIGATION}"
//X-Room
implementation "androidx.room:room-runtime:${X_ROOM}"
implementation "androidx.room:room-ktx:${X_ROOM}"
implementation "androidx.room:room-rxjava2:${X_ROOM}"
//X_Paging
implementation "androidx.paging:paging-runtime-ktx:${X_PAGING}"
implementation "androidx.paging:paging-rxjava2-ktx:${X_PAGING}"
//X-WorkManager
implementation "androidx.work:work-runtime-ktx:${X_WORK}"
//X-MultiDex
implementation "androidx.multidex:multidex:${X_MULTIDEX}"
//X-CardView
Expand All @@ -68,17 +85,13 @@ dependencies {
implementation "com.google.android.material:material:${X_MATERIAL}"
//X_ConstraintLayout
implementation "androidx.constraintlayout:constraintlayout:${X_CONSTRAINT}"
//X-Navigation
implementation "androidx.navigation:navigation-ui-ktx:${X_NAVIGATION}"
implementation "androidx.navigation:navigation-fragment-ktx:${X_NAVIGATION}"
//X-Room
implementation "androidx.room:room-runtime:${X_ROOM}"
//X-Room kotlin扩展和协程支持
implementation "androidx.room:room-ktx:${X_ROOM}"
//X-Room RxJava 支持库
implementation "androidx.room:room-rxjava2:${X_ROOM}"

//Kotlin支持
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${KOTLIN_VERSION}"
//Kotlin Coroutines 支持
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${KOTLIN_COROUTINES}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${KOTLIN_COROUTINES}"

//OkHttp
implementation "com.squareup.okhttp3:okhttp:${OKHTTP}"
implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP}"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ RX_FLUX_TEST_UTILS=1.0.1
ANDROID_MAVEN_GRADLE_PLUGIN=2.1
#Kotlin
KOTLIN_VERSION=1.3.40
KOTLIN_COROUTINES=1.3.0-M1
#Anko
ANKO=0.10.8
#官方兼容依赖库版本
X_CORE=1.2.0-alpha02
X_ROOM=2.1.0
X_PAGING=2.1.0
X_WORK=2.1.0-beta01
X_MULTIDEX=2.0.1
X_MATERIAL=1.1.0-alpha07
X_LIFECYCLE=2.2.0-alpha01
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import android.text.TextUtils
import com.huyingbao.core.common.module.CommonContants
import com.huyingbao.core.common.utils.PageInfoInterceptor
import com.huyingbao.core.utils.LocalStorageUtils
import com.huyingbao.module.github.api.ReposApi
import com.huyingbao.module.github.api.UserApi
import com.huyingbao.module.github.app.GithubContants
import dagger.Module
import dagger.Provides
Expand Down Expand Up @@ -63,16 +61,4 @@ class GithubAppModule {
.client(clientBuilder.build())
return retrofitBuilder.build()
}

@Singleton
@Provides
fun provideUserApi(retrofit: Retrofit): UserApi {
return retrofit.create(UserApi::class.java)
}

@Singleton
@Provides
fun provideReposApi(retrofit: Retrofit): ReposApi {
return retrofit.create(ReposApi::class.java)
}
}
Loading

0 comments on commit 308216b

Please sign in to comment.