Skip to content

Commit

Permalink
升级Gradle依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
ITGungnir committed Jul 21, 2020
1 parent 4f063d4 commit 9b724b3
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 25 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ println("------>>${MyRedux.instance.currState().result}")
```

## Change Logs
#### v1.6.6
* 优化Gradle依赖方式

#### v1.6.4
* ViewModel中支持从非主线程中推送数据

Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Project
implementation project(':common')
// JetPack
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$refresh_layout_version"
// ReactiveX
implementation "com.jakewharton.rxbinding2:rxbinding:$rxbinding_version"
}
6 changes: 0 additions & 6 deletions app/src/main/java/my/itgungnir/rxmvvm/App.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package my.itgungnir.rxmvvm

import androidx.multidex.MultiDexApplication
import com.squareup.leakcanary.LeakCanary
import my.itgungnir.rxmvvm.common.redux.MyRedux

class App : MultiDexApplication() {
Expand All @@ -10,10 +9,5 @@ class App : MultiDexApplication() {
super.onCreate()

MyRedux.init(this)

if (LeakCanary.isInAnalyzerProcess(this)) {
return
}
LeakCanary.install(this)
}
}
6 changes: 4 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ dependencies {
// Project
api project(':rx_mvvm')
// Kotlin
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Support
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// JetPack
api "androidx.appcompat:appcompat:$support_version"
api "com.google.android.material:material:$material_version"
api "androidx.recyclerview:recyclerview:$recyclerview_version"
api "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
// ReactiveX
api "io.reactivex.rxjava2:rxjava:$rxjava_version"
api "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
Expand Down
21 changes: 11 additions & 10 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
ext {
// Build
gradle_version = '3.5.3'
gradle_version = '4.0.1'
target_sdk_version = 28
min_sdk_version = 19
version_code = 1
version_name = '1.0'
jdk_version = JavaVersion.VERSION_1_8
// Kotlin
kotlin_version = '1.3.50'
// Support
kotlin_version = '1.3.72'
// JetPack
appcompat_version = '1.1.0'
support_version = '1.1.0'
material_version = '1.0.0'
material_version = '1.1.0'
recyclerview_version = '1.1.0'
// Lifecycle
lifecycle_version = '2.1.0'
refresh_layout_version = '1.1.0'
// ReactiveX
rxjava_version = '2.2.15'
rxjava_version = '2.2.19'
rxandroid_version = '2.1.1'
rxbinding_version = '2.2.0'
// Network
okhttp_version = '4.2.2'
retrofit_version = '2.6.2'
okhttp_version = '4.8.0'
retrofit_version = '2.9.0'
// Tools
jitpack_version = '2.1'
gson_version = '2.8.5'
gson_version = '2.8.6'
dex_version = '2.0.1'
leak_canary_version = '2.1'
leak_canary_version = '2.4'
}

static def addRepos(RepositoryHandler handler) {
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-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
12 changes: 6 additions & 6 deletions rx_mvvm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'

group = 'com.github.ITGungnir'
Expand All @@ -22,12 +22,12 @@ android {
}

dependencies {
// AndroidX
implementation "androidx.appcompat:appcompat:$support_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// JetPack
compileOnly "androidx.appcompat:appcompat:$support_version"
compileOnly "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
// Tools
implementation "com.google.code.gson:gson:$gson_version"
compileOnly "com.google.code.gson:gson:$gson_version"
}

0 comments on commit 9b724b3

Please sign in to comment.