Skip to content

Commit

Permalink
AndroidX dependency updates and View Binder extension extractions (#1182
Browse files Browse the repository at this point in the history
)

* Extract extension functions to separate file

* Update several AndroidX dependencies to latest stable

* Don't need this option

* Update deps to AndroidX

* Fix paging sample dependencies

Co-authored-by: Peter Elliott <[email protected]>
  • Loading branch information
pmecho and Peter Elliott authored May 12, 2021
1 parent 393a0a6 commit 74c5b00
Show file tree
Hide file tree
Showing 5 changed files with 347 additions and 342 deletions.
22 changes: 11 additions & 11 deletions blessedDeps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ rootProject.ext.TARGET_SDK_VERSION = 28
rootProject.ext.COMPILE_SDK_VERSION = 28
rootProject.ext.MIN_SDK_VERSION = 14

rootProject.ext.ANDROIDX_ANNOTATION = "1.0.0"
rootProject.ext.ANDROIDX_RECYCLERVIEW = "1.1.0"
rootProject.ext.ANDROIDX_MATERIAL = "1.0.0"
rootProject.ext.ANDROIDX_APPCOMPAT = "1.0.0"
rootProject.ext.ANDROIDX_ANNOTATION = "1.2.0"
rootProject.ext.ANDROIDX_RECYCLERVIEW = "1.2.0"
rootProject.ext.ANDROIDX_MATERIAL = "1.3.0"
rootProject.ext.ANDROIDX_APPCOMPAT = "1.2.0"
rootProject.ext.ANDROIDX_CARDVIEW = "1.0.0"
rootProject.ext.ANDROIDX_CORE_KTX = "1.0.0"
rootProject.ext.ANDROIDX_CORE_KTX = "1.3.2"
rootProject.ext.ANDROIDX_ESPRESSO_CORE = "3.3.0"
rootProject.ext.ANDROIDX_FRAGMENT_TESTING= "1.3.3"
rootProject.ext.ANDROIDX_LEGACY = "1.0.0"
rootProject.ext.ANDROIDX_PAGING = "2.0.0"
rootProject.ext.ANDROIDX_PAGING3 = "3.0.0-alpha13"
rootProject.ext.ANDROIDX_ROOM = "2.2.5"
rootProject.ext.ANDROIDX_RUNTIME = "2.0.0"
rootProject.ext.ANDROIDX_RUNTIME = "2.3.1"
rootProject.ext.ANDROIDX_DATABINDING_COMPILER = "3.2.1"
rootProject.ext.ANDROIDX_DATABINDING_ADAPTERS = "3.2.1"
rootProject.ext.ANDROIDX_DATABINDING_LIBRARY = "3.2.1"
rootProject.ext.ANDROIDX_VERSIONED_PARCELABLE = "1.0.0"
rootProject.ext.ANDROIDX_VERSIONED_PARCELABLE = "1.1.1"

rootProject.ext.ANDROID_DATA_BINDING = "1.3.1"
rootProject.ext.ANDROID_ARCH_TESTING = "1.1.1"
rootProject.ext.ANDROID_TEST_RUNNER = "1.0.2"
rootProject.ext.ANDROID_ARCH_TESTING = "2.1.0"
rootProject.ext.ANDROID_TEST_RUNNER = "1.3.0"
rootProject.ext.SQUARE_JAVAPOET_VERSION = "1.13.0"
rootProject.ext.SQUARE_KOTLINPOET_VERSION = "1.7.2"
rootProject.ext.KOTLIN_COROUTINES_VERSION = "1.3.9"
Expand Down Expand Up @@ -71,8 +71,8 @@ rootProject.ext.deps = [
androidRecyclerView : "androidx.recyclerview:recyclerview:$ANDROIDX_RECYCLERVIEW",
androidPagingComponent : "androidx.paging:paging-runtime:$ANDROIDX_PAGING",
androidPaging3Component: "androidx.paging:paging-runtime:$ANDROIDX_PAGING3",
androidArchCoreTesting : "android.arch.core:core-testing:$ANDROID_ARCH_TESTING",
androidTestRunner : "com.android.support.test:runner:$ANDROID_TEST_RUNNER",
androidArchCoreTesting : "androidx.arch.core:core-testing:$ANDROID_ARCH_TESTING",
androidTestRunner : "androidx.test:runner:$ANDROID_TEST_RUNNER",
androidAnnotations : "androidx.annotation:annotation:$ANDROIDX_ANNOTATION",
androidTestCore : "androidx.test:core:1.3.0",
androidTestExtJunitKtx : "androidx.test.ext:junit-ktx:1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions epoxy-pagingsample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ dependencies {

implementation "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT"

implementation "androidx.lifecycle:lifecycle-runtime:$ANDROIDX_RUNTIME"
implementation "androidx.lifecycle:lifecycle-extensions:$ANDROIDX_RUNTIME"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$ANDROIDX_RUNTIME"
implementation "androidx.activity:activity-ktx:1.2.3"

testImplementation 'junit:junit:4.12'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha2', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.appcompat.widget.AppCompatTextView
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModelProvider
import androidx.paging.LivePagedListBuilder
import androidx.paging.PagedList
import androidx.recyclerview.widget.LinearLayoutManager
Expand All @@ -33,7 +33,7 @@ class PagingSampleActivity : AppCompatActivity() {
recyclerView.layoutManager = LinearLayoutManager(this)
recyclerView.adapter = pagingController.adapter

val viewModel = ViewModelProviders.of(this).get(ActivityViewModel::class.java)
val viewModel = ViewModelProvider(this).get(ActivityViewModel::class.java)
viewModel.pagedList.observe(
this,
Observer {
Expand Down
Loading

0 comments on commit 74c5b00

Please sign in to comment.