diff --git a/circle.yml b/.circleci/config.yml
similarity index 92%
rename from circle.yml
rename to .circleci/config.yml
index 922c9596..c602d46c 100644
--- a/circle.yml
+++ b/.circleci/config.yml
@@ -1,12 +1,11 @@
-version: 2
+version: 2.1
jobs:
build:
docker:
- - image: circleci/android:api-26-alpha
+ - image: circleci/android:api-26
working_directory: ~/bigbang
environment:
JVM_OPTS: -Xmx3200m
- resource_class: large
steps:
- checkout
- restore_cache:
@@ -40,8 +39,8 @@ jobs:
- run:
name: Run Tests
command: ./gradlew test
- lint
- --max-workers=2
+ lint
+ --max-workers=2
- run:
name: Compile App Module
command: ./gradlew :app:compileLollipopAndAboveProductionReleaseSources --max-workers=1
diff --git a/app/build.gradle b/app/build.gradle
index 6c3f95e6..d7120537 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
classpath 'com.google.gms:google-services:3.1.1'
- classpath 'io.fabric.tools:gradle:1.24.3'
+ classpath 'io.fabric.tools:gradle:1.26.1'
}
}
@@ -129,11 +129,11 @@ dependencies {
api project(path: ':ui')
implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation "com.android.support:appcompat-v7:${libraryVersion.androidSupport}"
- implementation "com.android.support:cardview-v7:${libraryVersion.androidSupport}"
- implementation "com.android.support:design:${libraryVersion.androidSupport}"
- implementation "com.android.support:recyclerview-v7:${libraryVersion.androidSupport}"
- implementation "com.android.support:support-v13:${libraryVersion.androidSupport}"
+ implementation "androidx.appcompat:appcompat:${libraryVersion.androidSupport}"
+ implementation "androidx.cardview:cardview:${libraryVersion.androidSupport}"
+ implementation "com.google.android.material:material:${libraryVersion.androidSupport}"
+ implementation "androidx.recyclerview:recyclerview:${libraryVersion.androidSupport}"
+ implementation "androidx.legacy:legacy-support-v13:${libraryVersion.androidSupport}"
implementation "com.f2prateek.dart:dart:${libraryVersion.dart}"
implementation "com.f2prateek.dart:henson:${libraryVersion.dart}"
implementation "com.github.mrmike:Ok2Curl:${libraryVersion.ok2Curl}"
@@ -143,7 +143,6 @@ dependencies {
implementation "com.google.dagger:dagger:${libraryVersion.dagger}"
implementation "com.google.dagger:dagger-android-support:${libraryVersion.dagger}"
implementation "com.hannesdorfmann.fragmentargs:annotation:${libraryVersion.fragmentArgs}"
- implementation "com.hannesdorfmann.fragmentargs:bundler-parceler:${libraryVersion.fragmentArgs}"
implementation "com.jakewharton.threetenabp:threetenabp:${libraryVersion.localDateBackport}"
implementation "com.jakewharton.timber:timber:${libraryVersion.timber}"
implementation "com.squareup.okhttp3:logging-interceptor:${libraryVersion.okHttp}"
@@ -152,13 +151,12 @@ dependencies {
implementation "com.squareup.retrofit2:adapter-rxjava2:${libraryVersion.retrofit}"
implementation "com.squareup.retrofit2:converter-gson:${libraryVersion.retrofit}"
implementation "com.squareup.retrofit2:retrofit:${libraryVersion.retrofit}"
- implementation "com.trello.rxlifecycle2:rxlifecycle-components:${libraryVersion.rxLifecycle}"
- implementation "com.trello.rxlifecycle2:rxlifecycle:${libraryVersion.rxLifecycle}"
+ implementation "com.trello.rxlifecycle3:rxlifecycle-components:${libraryVersion.rxLifecycle}"
+ implementation "com.trello.rxlifecycle3:rxlifecycle:${libraryVersion.rxLifecycle}"
implementation "com.wdullaer:materialdatetimepicker:${libraryVersion.materialDateTimePicker}"
implementation "io.reactivex.rxjava2:rxandroid:${libraryVersion.rxAndroid}"
implementation "io.reactivex.rxjava2:rxjava:${libraryVersion.rxJava}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${libraryVersion.kotlin}"
- implementation "org.parceler:parceler-api:${libraryVersion.parceler}"
implementation "com.github.square.picasso:picasso:${libraryVersion.picasso}"
implementation 'com.viewpagerindicator:library:2.4.1'
@@ -168,7 +166,6 @@ dependencies {
kapt "com.google.dagger:dagger-android-processor:${libraryVersion.dagger}"
kapt "com.google.dagger:dagger-compiler:${libraryVersion.dagger}"
kapt "com.hannesdorfmann.fragmentargs:processor:${libraryVersion.fragmentArgs}"
- kapt "org.parceler:parceler:${libraryVersion.parceler}"
compileOnly 'javax.annotation:jsr250-api:1.0'
}
diff --git a/app/src/main/java/com/xmartlabs/template/module/FragmentBuildersModule.kt b/app/src/main/java/com/xmartlabs/template/module/FragmentBuildersModule.kt
index 81b5873c..5fb5f8c6 100644
--- a/app/src/main/java/com/xmartlabs/template/module/FragmentBuildersModule.kt
+++ b/app/src/main/java/com/xmartlabs/template/module/FragmentBuildersModule.kt
@@ -1,7 +1,6 @@
package com.xmartlabs.template.module
import com.xmartlabs.bigbang.ui.BaseFragment
-import com.xmartlabs.bigbang.ui.BaseFragment_MembersInjector
import dagger.Module
import dagger.android.ContributesAndroidInjector
diff --git a/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandLoadingScrollListener.kt b/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandLoadingScrollListener.kt
index 10c65fbd..e2833c3c 100644
--- a/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandLoadingScrollListener.kt
+++ b/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandLoadingScrollListener.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.template.ui.common
-import android.support.v7.widget.LinearLayoutManager
-import android.support.v7.widget.RecyclerView
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
/** An OnDemandLoadingScrollListener for recycler view pagination */
abstract class OnDemandLoadingScrollListener : RecyclerView.OnScrollListener() {
diff --git a/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandRecyclerViewScrollListener.kt b/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandRecyclerViewScrollListener.kt
index dd9937e3..eb8ea891 100644
--- a/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandRecyclerViewScrollListener.kt
+++ b/app/src/main/java/com/xmartlabs/template/ui/common/OnDemandRecyclerViewScrollListener.kt
@@ -1,9 +1,9 @@
package com.xmartlabs.template.ui.common
-import android.support.annotation.Dimension
-import android.support.annotation.Px
-import android.support.v4.widget.NestedScrollView
-import android.support.v7.widget.RecyclerView
+import androidx.annotation.Dimension
+import androidx.annotation.Px
+import androidx.core.widget.NestedScrollView
+import androidx.recyclerview.widget.RecyclerView
import com.xmartlabs.bigbang.core.extensions.dpToPx
/** An OnDemandLoadingScrollListener for recycler view pagination */
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 56a3068f..21739d87 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,5 +1,5 @@
-
-
-
-
-
-
+
-
+
-
+
-
+
diff --git a/build.gradle b/build.gradle
index bfee4957..88779e8d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,10 +4,10 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.4'
+ classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41'
+ classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
}
}
diff --git a/core/build.gradle b/core/build.gradle
index 9304166e..dfd85fb5 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -30,7 +30,7 @@ android {
targetSdkVersion project.ext.targetSdkVersion
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
@@ -47,7 +47,7 @@ android {
}
dependencies {
- androidTestImplementation("com.android.support.test.espresso:espresso-core:${libraryVersion.espresso}") {
+ androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "com.crittercism.dexmaker:dexmaker:${libraryVersion.dexmaker}"
@@ -55,9 +55,9 @@ dependencies {
androidTestImplementation "com.crittercism.dexmaker:dexmaker-mockito:${libraryVersion.dexmaker}"
androidTestImplementation "junit:junit:${libraryVersion.junit}"
androidTestImplementation "org.mockito:mockito-core:${libraryVersion.mockito}"
- api "com.android.support:appcompat-v7:${libraryVersion.androidSupport}"
- api "com.android.support:design:${libraryVersion.androidSupport}"
- api "com.android.support:support-v13:${libraryVersion.androidSupport}"
+ api "androidx.appcompat:appcompat:${libraryVersion.androidSupport}"
+ api "com.google.android.material:material:${libraryVersion.androidSupport}"
+ api "androidx.legacy:legacy-support-v13:${libraryVersion.androidSupport}"
api "com.f2prateek.dart:dart:${libraryVersion.dart}"
api "com.f2prateek.dart:henson:${libraryVersion.dart}"
api "com.github.mrmike:Ok2Curl:${libraryVersion.ok2Curl}"
diff --git a/core/src/androidTest/java/com/xmartlabs/bigbang/core/MetricsExtensionsTest.kt b/core/src/androidTest/java/com/xmartlabs/bigbang/core/MetricsExtensionsTest.kt
index f0fd0b82..d13508bf 100644
--- a/core/src/androidTest/java/com/xmartlabs/bigbang/core/MetricsExtensionsTest.kt
+++ b/core/src/androidTest/java/com/xmartlabs/bigbang/core/MetricsExtensionsTest.kt
@@ -1,10 +1,10 @@
package com.xmartlabs.bigbang.core
import android.content.res.Resources
-import android.support.annotation.DimenRes
-import android.support.annotation.Dimension
-import android.support.test.runner.AndroidJUnit4
import android.util.DisplayMetrics
+import androidx.annotation.DimenRes
+import androidx.annotation.Dimension
+import androidx.test.runner.AndroidJUnit4
import com.xmartlabs.bigbang.core.extensions.displayMetrics
import com.xmartlabs.bigbang.core.extensions.dpToPx
import com.xmartlabs.bigbang.core.extensions.pxToDp
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/controller/CoreSessionRepository.kt b/core/src/main/java/com/xmartlabs/bigbang/core/controller/CoreSessionRepository.kt
index 8d60dac7..06b7f3c4 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/controller/CoreSessionRepository.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/controller/CoreSessionRepository.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.core.controller
import android.content.SharedPreferences
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.model.SessionType
/**
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityDao.kt b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityDao.kt
index 75a3042d..48698cd8 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityDao.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityDao.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.controller
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import io.reactivex.Completable
import io.reactivex.Maybe
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityRepository.kt b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityRepository.kt
index 2e58599c..d5406b24 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityRepository.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityRepository.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.controller
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.extensions.applyIoSchedulers
import com.xmartlabs.bigbang.core.extensions.observeOnIo
import com.xmartlabs.bigbang.core.extensions.subscribeOnIo
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityServiceProvider.kt b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityServiceProvider.kt
index 1f5795bc..7e2b36a0 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityServiceProvider.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/controller/EntityServiceProvider.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.controller
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.model.EntityWithId
import io.reactivex.Maybe
import io.reactivex.Single
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/controller/SharedPreferencesSource.kt b/core/src/main/java/com/xmartlabs/bigbang/core/controller/SharedPreferencesSource.kt
index d25d8bb1..a3e4ecb7 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/controller/SharedPreferencesSource.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/controller/SharedPreferencesSource.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.core.controller
import android.content.SharedPreferences
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.google.gson.Gson
import javax.inject.Inject
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/di/AppInjector.kt b/core/src/main/java/com/xmartlabs/bigbang/core/di/AppInjector.kt
index d0bda85b..9be3e8bc 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/di/AppInjector.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/di/AppInjector.kt
@@ -3,9 +3,6 @@ package com.xmartlabs.bigbang.core.di
import android.app.Activity
import android.app.Application
import android.os.Bundle
-import android.support.v4.app.Fragment
-import android.support.v4.app.FragmentActivity
-import android.support.v4.app.FragmentManager
import dagger.android.AndroidInjection
import dagger.android.HasActivityInjector
import dagger.android.support.AndroidSupportInjection
@@ -39,14 +36,14 @@ object AppInjector {
if (activity is HasSupportFragmentInjector) {
AndroidInjection.inject(activity)
}
- if (activity is FragmentActivity) {
+ if (activity is androidx.fragment.app.FragmentActivity) {
activity.supportFragmentManager
.registerFragmentLifecycleCallbacks(
- object : FragmentManager.FragmentLifecycleCallbacks() {
+ object : androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentCreated(
- fm: FragmentManager,
- f: Fragment,
- savedInstanceState: Bundle?
+ fm: androidx.fragment.app.FragmentManager,
+ f: androidx.fragment.app.Fragment,
+ savedInstanceState: Bundle?
) {
if (f is Injectable) {
AndroidSupportInjection.inject(f)
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ColorExtensions.kt b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ColorExtensions.kt
index 12d82e64..40c713bc 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ColorExtensions.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ColorExtensions.kt
@@ -1,8 +1,8 @@
package com.xmartlabs.bigbang.core.extensions
import android.content.Context
-import android.support.annotation.ColorRes
-import android.support.v4.content.ContextCompat
+import androidx.annotation.ColorRes
+import androidx.core.content.ContextCompat
/** Extension object that contains all related color extensions that make use of [Context] */
val Context.color
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ContextExtensions.kt b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ContextExtensions.kt
index 67f89767..fa14a244 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ContextExtensions.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/ContextExtensions.kt
@@ -29,6 +29,6 @@ fun Context.copyTextToClipboard(text: String) {
} else {
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager
val clip = android.content.ClipData.newPlainText("Copied Text", text)
- clipboard.primaryClip = clip
+ clipboard.setPrimaryClip(clip)
}
}
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/MetricExtensions.kt b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/MetricExtensions.kt
index 21a148a6..24fda773 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/extensions/MetricExtensions.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/extensions/MetricExtensions.kt
@@ -2,10 +2,10 @@ package com.xmartlabs.bigbang.core.extensions
import android.content.res.Resources
import android.content.res.Resources.Theme
-import android.support.annotation.AttrRes
-import android.support.annotation.Dimension
-import android.support.annotation.VisibleForTesting
-import android.support.v7.app.ActionBar
+import androidx.annotation.AttrRes
+import androidx.annotation.Dimension
+import androidx.annotation.VisibleForTesting
+import androidx.appcompat.app.ActionBar
@VisibleForTesting
var displayMetrics = Resources.getSystem().displayMetrics
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/IntentHelper.kt b/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/IntentHelper.kt
index 0b58ce1e..fb114508 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/IntentHelper.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/IntentHelper.kt
@@ -5,8 +5,8 @@ import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
-import android.support.annotation.RequiresPermission
-import android.support.annotation.StringRes
+import androidx.annotation.RequiresPermission
+import androidx.annotation.StringRes
object IntentHelper {
/**
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/UiHelper.kt b/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/UiHelper.kt
index b9176331..0818885f 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/UiHelper.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/helper/ui/UiHelper.kt
@@ -3,17 +3,17 @@ package com.xmartlabs.bigbang.core.helper.ui
import android.app.Activity
import android.content.ContentResolver
import android.content.Context
-import android.support.annotation.DrawableRes
-import android.support.design.widget.TextInputLayout
-import android.support.v4.util.Pair
import android.text.InputType
import android.text.TextUtils
import android.widget.ArrayAdapter
import android.widget.EditText
import android.widget.Spinner
+import androidx.annotation.DrawableRes
+import androidx.core.util.Pair
import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability
-import java.util.Locale
+import com.google.android.material.textfield.TextInputLayout
+import java.util.*
object UiHelper {
/**
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/repository/CoreSessionRepository.kt b/core/src/main/java/com/xmartlabs/bigbang/core/repository/CoreSessionRepository.kt
index 5187c259..aa81f9e9 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/repository/CoreSessionRepository.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/repository/CoreSessionRepository.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.core.repository
import android.content.SharedPreferences
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.model.SessionType
/**
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityDao.kt b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityDao.kt
index 18f56a04..bb992e26 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityDao.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityDao.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.repository
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import io.reactivex.Completable
import io.reactivex.Maybe
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityRepository.kt b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityRepository.kt
index 1b016a6c..a1905756 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityRepository.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityRepository.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.repository
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.extensions.applyIoSchedulers
import com.xmartlabs.bigbang.core.extensions.observeOnIo
import com.xmartlabs.bigbang.core.extensions.subscribeOnIo
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityServiceProvider.kt b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityServiceProvider.kt
index 27fe9ecd..6d573126 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityServiceProvider.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/repository/EntityServiceProvider.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.core.repository
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.xmartlabs.bigbang.core.model.EntityWithId
import io.reactivex.Maybe
import io.reactivex.Single
diff --git a/core/src/main/java/com/xmartlabs/bigbang/core/repository/SharedPreferencesSource.kt b/core/src/main/java/com/xmartlabs/bigbang/core/repository/SharedPreferencesSource.kt
index 7d1a5afd..5afaad8c 100644
--- a/core/src/main/java/com/xmartlabs/bigbang/core/repository/SharedPreferencesSource.kt
+++ b/core/src/main/java/com/xmartlabs/bigbang/core/repository/SharedPreferencesSource.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.core.repository
import android.content.SharedPreferences
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.google.gson.Gson
import javax.inject.Inject
diff --git a/core/src/test/java/com/xmartlabs/bigbang/core/ObjectHelperTest.kt b/core/src/test/java/com/xmartlabs/bigbang/core/ObjectHelperTest.kt
index 307def17..06a49807 100644
--- a/core/src/test/java/com/xmartlabs/bigbang/core/ObjectHelperTest.kt
+++ b/core/src/test/java/com/xmartlabs/bigbang/core/ObjectHelperTest.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.base.core
-import android.support.v4.util.Pair
+import androidx.core.util.Pair
import com.google.gson.Gson
import com.xmartlabs.bigbang.core.helper.ObjectHelper
import org.hamcrest.MatcherAssert.assertThat
diff --git a/dbflow/build.gradle b/dbflow/build.gradle
index 1f433771..236db91c 100644
--- a/dbflow/build.gradle
+++ b/dbflow/build.gradle
@@ -32,7 +32,7 @@ android {
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -50,7 +50,7 @@ android {
dependencies {
api project(':core')
- api "com.android.support:support-v13:${libraryVersion.androidSupport}"
+ api "androidx.legacy:legacy-support-v13:${libraryVersion.androidSupport}"
api "com.github.Raizlabs.DBFlow:dbflow:${libraryVersion.dbFlow}"
api "com.github.Raizlabs.DBFlow:dbflow-core:${libraryVersion.dbFlow}"
api "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${libraryVersion.dbFlow}"
diff --git a/dbflow/src/main/java/com/xmartlabs/bigbang/dbflow/controller/DbFlowController.kt b/dbflow/src/main/java/com/xmartlabs/bigbang/dbflow/controller/DbFlowController.kt
index b683d031..ac00e3ea 100644
--- a/dbflow/src/main/java/com/xmartlabs/bigbang/dbflow/controller/DbFlowController.kt
+++ b/dbflow/src/main/java/com/xmartlabs/bigbang/dbflow/controller/DbFlowController.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.dbflow.controller
-import android.support.annotation.CheckResult
+import androidx.annotation.CheckResult
import com.raizlabs.android.dbflow.kotlinextensions.delete
import com.raizlabs.android.dbflow.kotlinextensions.select
import com.raizlabs.android.dbflow.rx2.kotlinextensions.list
@@ -8,9 +8,9 @@ import com.raizlabs.android.dbflow.rx2.kotlinextensions.rx
import com.raizlabs.android.dbflow.sql.language.SQLOperator
import com.raizlabs.android.dbflow.sql.language.property.Property
import com.raizlabs.android.dbflow.structure.BaseModel
-import com.xmartlabs.bigbang.core.repository.EntityDao
import com.xmartlabs.bigbang.core.extensions.observeOnIo
import com.xmartlabs.bigbang.core.model.EntityWithId
+import com.xmartlabs.bigbang.core.repository.EntityDao
import io.reactivex.Maybe
import io.reactivex.Observable
import io.reactivex.Single
diff --git a/gradle.properties b/gradle.properties
index c04c048e..223c6a00 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,3 +17,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+android.enableJetifier=true
+android.useAndroidX=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index d67790dc..3997922c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon May 21 16:15:57 UYT 2018
+#Thu Dec 19 17:05:32 UYT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/instrumental-test/build.gradle b/instrumental-test/build.gradle
index 9004efb5..139c759e 100644
--- a/instrumental-test/build.gradle
+++ b/instrumental-test/build.gradle
@@ -33,7 +33,7 @@ android {
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -51,16 +51,16 @@ android {
dependencies {
api project(path: ':core')
- api "com.android.support:appcompat-v7:${libraryVersion.androidSupport}"
- api "com.android.support:design:${libraryVersion.androidSupport}"
- api "com.android.support:support-v13:${libraryVersion.androidSupport}"
+ api "androidx.appcompat:appcompat:${libraryVersion.androidSupport}"
+ api "com.google.android.material:material:${libraryVersion.androidSupport}"
+ api "androidx.legacy:legacy-support-v13:${libraryVersion.androidSupport}"
- api "com.android.support:support-annotations:${libraryVersion.androidSupport}"
- api "com.android.support.test:rules:${libraryVersion.androidSupportTest}"
- api("com.android.support.test:runner:${libraryVersion.androidSupportTest}") {
+ api "androidx.annotation:annotation:${libraryVersion.androidSupport}"
+ api "androidx.test:rules:${libraryVersion.androidSupportTest}"
+ api("androidx.test.ext:junit:${libraryVersion.androidSupportTest}") {
exclude group: 'com.android.support', module: 'support-annotations'
}
- api("com.android.support.test.espresso:espresso-contrib:${libraryVersion.espresso}") {
+ api("androidx.test.espresso:espresso-contrib:${libraryVersion.espresso}") {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
@@ -68,11 +68,11 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
- api("com.android.support.test.espresso:espresso-core:${libraryVersion.espresso}") {
+ api("androidx.test.espresso:espresso-core:${libraryVersion.espresso}") {
exclude group: 'com.android.support', module: 'support-annotations'
}
- api "com.android.support.test.uiautomator:uiautomator-v18:${libraryVersion.uiautomator}"
- api "com.android.support.test.espresso:espresso-intents:${libraryVersion.espresso}"
+ api "androidx.test.uiautomator:uiautomator:${libraryVersion.uiautomator}"
+ api "androidx.test.espresso:espresso-intents:${libraryVersion.espresso}"
api "com.wdullaer:materialdatetimepicker:${libraryVersion.materialDateTimePicker}"
api "com.jakewharton.threetenabp:threetenabp:${libraryVersion.localDateBackport}"
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/RecyclerViewAssertions.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/RecyclerViewAssertions.kt
index 3d803f63..551adda7 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/RecyclerViewAssertions.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/RecyclerViewAssertions.kt
@@ -1,9 +1,9 @@
package com.xmartlabs.bigbang.test.assertions
-import android.support.test.espresso.core.internal.deps.guava.base.Preconditions
-import android.support.test.espresso.matcher.BoundedMatcher
-import android.support.v7.widget.RecyclerView
import android.view.View
+import androidx.recyclerview.widget.RecyclerView
+import androidx.test.espresso.core.internal.deps.guava.base.Preconditions
+import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
@@ -23,7 +23,7 @@ object RecyclerViewAssertions {
internal var items = -1
override fun matchesSafely(view: View): Boolean {
- items = (view as RecyclerView).adapter.itemCount
+ items = (view as RecyclerView).adapter!!.itemCount
return items == count
}
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/SwipeToRefreshAssertions.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/SwipeToRefreshAssertions.kt
index b357cc8f..d01a952e 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/SwipeToRefreshAssertions.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/assertions/SwipeToRefreshAssertions.kt
@@ -1,8 +1,8 @@
package com.xmartlabs.bigbang.test.assertions
-import android.support.test.espresso.UiController
-import android.support.test.espresso.ViewAction
import android.view.View
+import androidx.test.espresso.UiController
+import androidx.test.espresso.ViewAction
import org.hamcrest.Matcher
object SwipeToRefreshAssertions {
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/InstrumentationExtensions.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/InstrumentationExtensions.kt
index 1d59a0d5..65b5d265 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/InstrumentationExtensions.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/InstrumentationExtensions.kt
@@ -3,14 +3,14 @@ package com.xmartlabs.bigbang.test.extensions
import android.app.Activity
import android.app.Instrumentation
import android.os.Build
-import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry
-import android.support.test.runner.lifecycle.Stage
-import android.support.test.uiautomator.UiDevice
-import android.support.test.uiautomator.UiObjectNotFoundException
-import android.support.test.uiautomator.UiSelector
+import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry
+import androidx.test.runner.lifecycle.Stage
+import androidx.test.uiautomator.UiDevice
+import androidx.test.uiautomator.UiObjectNotFoundException
+import androidx.test.uiautomator.UiSelector
import com.xmartlabs.bigbang.test.helpers.TestUtils
import timber.log.Timber
-import java.util.Locale
+import java.util.*
/**
* Retrieves the first activity with `Stage.RESUMED` state
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/ViewInteractionExtensions.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/ViewInteractionExtensions.kt
index 48c5c01f..d3574cd7 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/ViewInteractionExtensions.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/extensions/ViewInteractionExtensions.kt
@@ -1,17 +1,16 @@
package com.xmartlabs.bigbang.test.extensions
-import android.support.annotation.IdRes
-import android.support.test.espresso.ViewInteraction
-
-import android.support.test.espresso.action.ViewActions
-import android.support.test.espresso.action.ViewActions.click
-import android.support.test.espresso.assertion.ViewAssertions
-import android.support.test.espresso.assertion.ViewAssertions.doesNotExist
-import android.support.test.espresso.assertion.ViewAssertions.matches
-import android.support.test.espresso.matcher.ViewMatchers
-import android.support.test.espresso.matcher.ViewMatchers.hasDescendant
-import android.support.test.espresso.matcher.ViewMatchers.isDisplayed
import android.view.View
+import androidx.annotation.IdRes
+import androidx.test.espresso.ViewInteraction
+import androidx.test.espresso.action.ViewActions
+import androidx.test.espresso.action.ViewActions.click
+import androidx.test.espresso.assertion.ViewAssertions
+import androidx.test.espresso.assertion.ViewAssertions.doesNotExist
+import androidx.test.espresso.assertion.ViewAssertions.matches
+import androidx.test.espresso.matcher.ViewMatchers
+import androidx.test.espresso.matcher.ViewMatchers.hasDescendant
+import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import com.xmartlabs.bigbang.test.assertions.RecyclerViewAssertions
import com.xmartlabs.bigbang.test.assertions.SwipeToRefreshAssertions
import com.xmartlabs.bigbang.test.viewaction.MaterialPickerDialogActions
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/helpers/EspressoUtils.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/helpers/EspressoUtils.kt
index b2303bac..9c81c4c5 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/helpers/EspressoUtils.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/helpers/EspressoUtils.kt
@@ -1,17 +1,13 @@
package com.xmartlabs.bigbang.test.helpers
-import android.support.annotation.IdRes
-import android.support.annotation.StringRes
-import android.support.test.espresso.Espresso.onView
-import android.support.test.espresso.ViewInteraction
-import android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom
-import android.support.test.espresso.matcher.ViewMatchers.isClickable
-import android.support.test.espresso.matcher.ViewMatchers.withId
-import android.support.test.espresso.matcher.ViewMatchers.withParent
-import android.support.test.espresso.matcher.ViewMatchers.withText
-import android.support.v7.widget.Toolbar
import android.view.View
import android.widget.ImageButton
+import androidx.annotation.IdRes
+import androidx.annotation.StringRes
+import androidx.appcompat.widget.Toolbar
+import androidx.test.espresso.Espresso.onView
+import androidx.test.espresso.ViewInteraction
+import androidx.test.espresso.matcher.ViewMatchers.*
import org.hamcrest.Matchers.allOf
/**
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/MaterialPickerDialogExtensions.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/MaterialPickerDialogExtensions.kt
index 3ab9dcd3..60aa08d4 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/MaterialPickerDialogExtensions.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/MaterialPickerDialogExtensions.kt
@@ -1,11 +1,10 @@
package com.xmartlabs.bigbang.test.viewaction
-import android.support.test.espresso.UiController
-import android.support.test.espresso.ViewAction
-import android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom
-import android.support.test.espresso.matcher.ViewMatchers.isDisplayed
-import android.util.Log
import android.view.View
+import androidx.test.espresso.UiController
+import androidx.test.espresso.ViewAction
+import androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom
+import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import com.wdullaer.materialdatetimepicker.date.DatePickerController
import com.wdullaer.materialdatetimepicker.date.DayPickerView
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout
diff --git a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/NestedScrollViewViewAction.kt b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/NestedScrollViewViewAction.kt
index fbda635f..a2e31c2d 100644
--- a/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/NestedScrollViewViewAction.kt
+++ b/instrumental-test/src/main/java/com/xmartlabs/bigbang/test/viewaction/NestedScrollViewViewAction.kt
@@ -1,18 +1,15 @@
package com.xmartlabs.bigbang.test.viewaction
import android.graphics.Rect
-import android.support.test.espresso.PerformException
-import android.support.test.espresso.UiController
-import android.support.test.espresso.ViewAction
-import android.support.test.espresso.action.ViewActions
-import android.support.test.espresso.matcher.ViewMatchers
-import android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom
-import android.support.test.espresso.matcher.ViewMatchers.isDescendantOfA
-import android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast
-import android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility
-import android.support.test.espresso.util.HumanReadables
-import android.support.v4.widget.NestedScrollView
import android.view.View
+import androidx.core.widget.NestedScrollView
+import androidx.test.espresso.PerformException
+import androidx.test.espresso.UiController
+import androidx.test.espresso.ViewAction
+import androidx.test.espresso.action.ViewActions
+import androidx.test.espresso.matcher.ViewMatchers
+import androidx.test.espresso.matcher.ViewMatchers.*
+import androidx.test.espresso.util.HumanReadables
import org.hamcrest.Matchers.allOf
import org.hamcrest.Matchers.anyOf
import timber.log.Timber
diff --git a/log-crashlytics/build.gradle b/log-crashlytics/build.gradle
index c79c50d3..7160a3c9 100644
--- a/log-crashlytics/build.gradle
+++ b/log-crashlytics/build.gradle
@@ -28,7 +28,7 @@ android {
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
diff --git a/mvp/build.gradle b/mvp/build.gradle
index 6323e020..9049baee 100644
--- a/mvp/build.gradle
+++ b/mvp/build.gradle
@@ -31,7 +31,7 @@ android {
targetSdkVersion project.ext.targetSdkVersion
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
diff --git a/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/BaseMvpPresenter.kt b/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/BaseMvpPresenter.kt
index 994cec6f..321fafcb 100644
--- a/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/BaseMvpPresenter.kt
+++ b/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/BaseMvpPresenter.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.mvp.ui
-import android.support.annotation.UiThread
+import androidx.annotation.UiThread
import java.lang.ref.WeakReference
diff --git a/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/MvpPresenter.kt b/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/MvpPresenter.kt
index a8b47b8a..a3917aa7 100644
--- a/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/MvpPresenter.kt
+++ b/mvp/src/main/java/com/xmartlabs/bigbang/mvp/ui/MvpPresenter.kt
@@ -1,8 +1,8 @@
package com.xmartlabs.bigbang.mvp.ui
import android.app.Activity
-import android.support.annotation.UiThread
-import android.support.v4.app.Fragment
+import androidx.annotation.UiThread
+import androidx.fragment.app.Fragment
/**
* The base interface that defines a presenter in the MVP patterns.
diff --git a/mvvm/build.gradle b/mvvm/build.gradle
index 8fbe944a..dbb36607 100644
--- a/mvvm/build.gradle
+++ b/mvvm/build.gradle
@@ -28,7 +28,7 @@ android {
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -47,7 +47,7 @@ dependencies {
api project(path: ':core')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${libraryVersion.kotlin}"
- implementation "android.arch.lifecycle:livedata:${libraryVersion.archLifecycle}"
+ implementation "androidx.lifecycle:lifecycle-livedata:${libraryVersion.archLifecycle}"
}
apply from: '../bintray.gradle'
diff --git a/mvvm/src/main/java/com/xmartlabs/bigbang/mvvm/result/ResultRxExtensions.kt b/mvvm/src/main/java/com/xmartlabs/bigbang/mvvm/result/ResultRxExtensions.kt
index df933591..b406c5c5 100644
--- a/mvvm/src/main/java/com/xmartlabs/bigbang/mvvm/result/ResultRxExtensions.kt
+++ b/mvvm/src/main/java/com/xmartlabs/bigbang/mvvm/result/ResultRxExtensions.kt
@@ -1,17 +1,8 @@
package com.xmartlabs.bigbang.mvvm.result
-import android.arch.lifecycle.LiveData
-import android.arch.lifecycle.MutableLiveData
-import io.reactivex.Completable
-import io.reactivex.CompletableObserver
-import io.reactivex.Flowable
-import io.reactivex.FlowableSubscriber
-import io.reactivex.Maybe
-import io.reactivex.MaybeObserver
-import io.reactivex.Observable
-import io.reactivex.Observer
-import io.reactivex.Single
-import io.reactivex.SingleObserver
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import io.reactivex.*
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import org.reactivestreams.Subscription
diff --git a/retrofit/build.gradle b/retrofit/build.gradle
index b1bc9b26..0edcbbb1 100644
--- a/retrofit/build.gradle
+++ b/retrofit/build.gradle
@@ -28,7 +28,7 @@ android {
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -46,7 +46,7 @@ android {
dependencies {
api project(':core')
- api "com.android.support:support-annotations:${libraryVersion.androidSupport}"
+ api "androidx.annotation:annotation:${libraryVersion.androidSupport}"
api "com.google.dagger:dagger:${libraryVersion.dagger}"
api "com.google.dagger:dagger-android-support:${libraryVersion.dagger}"
api "com.jakewharton.threetenabp:threetenabp:${libraryVersion.localDateBackport}"
diff --git a/ui/build.gradle b/ui/build.gradle
index f2086198..a3ebada4 100644
--- a/ui/build.gradle
+++ b/ui/build.gradle
@@ -31,7 +31,7 @@ android {
targetSdkVersion project.ext.targetSdkVersion
versionCode versionCodeId
versionName version
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
@@ -54,28 +54,25 @@ dependencies {
api project(path: ':core')
- api "com.android.support:appcompat-v7:${libraryVersion.androidSupport}"
- api "com.android.support:recyclerview-v7:${libraryVersion.androidSupport}"
- api "com.android.support:design:${libraryVersion.androidSupport}"
- api "com.android.support:recyclerview-v7:${libraryVersion.androidSupport}"
- api "com.android.support:support-v13:${libraryVersion.androidSupport}"
+ api "androidx.appcompat:appcompat:${libraryVersion.androidSupport}"
+ api "androidx.recyclerview:recyclerview:${libraryVersion.androidSupport}"
+ api "com.google.android.material:material:${libraryVersion.androidSupport}"
+ api "androidx.recyclerview:recyclerview:${libraryVersion.androidSupport}"
+ api "androidx.legacy:legacy-support-v13:${libraryVersion.androidSupport}"
api "com.f2prateek.dart:dart:${libraryVersion.dart}"
api "com.f2prateek.dart:henson:${libraryVersion.dart}"
api "com.google.dagger:dagger:${libraryVersion.dagger}"
api "com.google.dagger:dagger-android-support:${libraryVersion.dagger}"
api "com.hannesdorfmann.fragmentargs:annotation:${libraryVersion.fragmentArgs}"
- api "com.hannesdorfmann.fragmentargs:bundler-parceler:${libraryVersion.fragmentArgs}"
- api "com.trello.rxlifecycle2:rxlifecycle:${libraryVersion.rxLifecycle}"
- api "com.trello.rxlifecycle2:rxlifecycle-components:${libraryVersion.rxLifecycle}"
+ api "com.trello.rxlifecycle3:rxlifecycle:${libraryVersion.rxLifecycle}"
+ api "com.trello.rxlifecycle3:rxlifecycle-components:${libraryVersion.rxLifecycle}"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${libraryVersion.kotlin}"
- api "org.parceler:parceler-api:${libraryVersion.parceler}"
kapt "com.f2prateek.dart:dart-processor:${libraryVersion.dart}"
kapt "com.f2prateek.dart:henson-processor:${libraryVersion.dart}"
kapt "com.google.dagger:dagger-android-processor:${libraryVersion.dagger}"
kapt "com.google.dagger:dagger-compiler:${libraryVersion.dagger}"
kapt "com.hannesdorfmann.fragmentargs:processor:${libraryVersion.fragmentArgs}"
- kapt "org.parceler:parceler:${libraryVersion.parceler}"
testImplementation "junit:junit:${libraryVersion.junit}"
}
diff --git a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/common/ListActivity.kt b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/common/ListActivity.kt
index e51744fd..89ea9868 100644
--- a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/common/ListActivity.kt
+++ b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/common/ListActivity.kt
@@ -2,8 +2,8 @@ package com.xmartlabs.bigbang.ui.recyclerview.common
import android.app.Activity
import android.os.Bundle
-import android.support.v7.widget.LinearLayoutManager
-import android.support.v7.widget.RecyclerView
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
import com.xmartlabs.bigbang.ui.test.R
import com.xmartlabs.bigbang.ui.test.R.layout.activity_with_list
diff --git a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/BrandCarAdapter.kt b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/BrandCarAdapter.kt
index 93bd9668..132f1029 100644
--- a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/BrandCarAdapter.kt
+++ b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/BrandCarAdapter.kt
@@ -1,9 +1,9 @@
package com.xmartlabs.bigbang.ui.recyclerview.multipleitems
-import android.support.annotation.MainThread
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
+import androidx.annotation.MainThread
import com.xmartlabs.bigbang.ui.common.recyclerview.BaseRecyclerViewAdapter
import com.xmartlabs.bigbang.ui.common.recyclerview.SimpleItemRecycleItemType
import com.xmartlabs.bigbang.ui.common.recyclerview.SingleItemBaseViewHolder
diff --git a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/MultipleItemRecyclerViewTest.kt b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/MultipleItemRecyclerViewTest.kt
index 0875df64..6320663b 100644
--- a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/MultipleItemRecyclerViewTest.kt
+++ b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/multipleitems/MultipleItemRecyclerViewTest.kt
@@ -1,11 +1,11 @@
package com.xmartlabs.bigbang.ui.recyclerview.multipleitems
-import android.support.test.espresso.Espresso.onView
-import android.support.test.espresso.assertion.ViewAssertions.matches
-import android.support.test.espresso.matcher.ViewMatchers.withId
-import android.support.test.espresso.matcher.ViewMatchers.withText
-import android.support.test.rule.ActivityTestRule
-import android.support.test.runner.AndroidJUnit4
+import androidx.test.espresso.Espresso.onView
+import androidx.test.espresso.assertion.ViewAssertions.matches
+import androidx.test.espresso.matcher.ViewMatchers.withId
+import androidx.test.espresso.matcher.ViewMatchers.withText
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.rule.ActivityTestRule
import com.xmartlabs.bigbang.test.assertions.RecyclerViewAssertions
import com.xmartlabs.bigbang.test.extensions.checkRecyclerViewAtPosition
import com.xmartlabs.bigbang.test.extensions.checkRecyclerViewCountIs
diff --git a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/singleitem/SimpleItemRecyclerViewTest.kt b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/singleitem/SimpleItemRecyclerViewTest.kt
index 9ffdf3ce..e6cbea9b 100644
--- a/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/singleitem/SimpleItemRecyclerViewTest.kt
+++ b/ui/src/androidTest/java/com/xmartlabs/bigbang/ui/recyclerview/singleitem/SimpleItemRecyclerViewTest.kt
@@ -1,10 +1,10 @@
package com.xmartlabs.bigbang.ui.recyclerview.singleitem
-import android.support.test.espresso.Espresso.onView
-import android.support.test.espresso.matcher.ViewMatchers.withId
-import android.support.test.espresso.matcher.ViewMatchers.withText
-import android.support.test.rule.ActivityTestRule
-import android.support.test.runner.AndroidJUnit4
+import androidx.test.espresso.Espresso.onView
+import androidx.test.espresso.matcher.ViewMatchers.withId
+import androidx.test.espresso.matcher.ViewMatchers.withText
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.rule.ActivityTestRule
import com.xmartlabs.bigbang.test.extensions.checkRecyclerViewAtPosition
import com.xmartlabs.bigbang.test.extensions.checkRecyclerViewCountIs
import com.xmartlabs.bigbang.ui.recyclerview.common.Car
diff --git a/ui/src/androidTest/res/layout/activity_with_list.xml b/ui/src/androidTest/res/layout/activity_with_list.xml
index 7379f2c3..23973a9b 100644
--- a/ui/src/androidTest/res/layout/activity_with_list.xml
+++ b/ui/src/androidTest/res/layout/activity_with_list.xml
@@ -1,5 +1,5 @@
->(val clazz: Class) : ParcelConverter {
- companion object {
- private const val NULL = -1
- }
-
- override fun toParcel(input: T?, parcel: android.os.Parcel) {
- parcel.writeInt(input?.ordinal ?: NULL)
- }
-
- override fun fromParcel(parcel: android.os.Parcel): T? {
- val ordinal = parcel.readInt()
- return EnumSet.allOf(clazz)
- .filter { it.ordinal == ordinal }
- .firstOrNull()
- }
-}
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseRecyclerViewAdapter.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseRecyclerViewAdapter.kt
index 61d77efd..0baad840 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseRecyclerViewAdapter.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseRecyclerViewAdapter.kt
@@ -1,18 +1,18 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
-import android.support.annotation.CallSuper
-import android.support.annotation.LayoutRes
-import android.support.annotation.MainThread
-import android.support.v7.util.DiffUtil
-import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.annotation.CallSuper
+import androidx.annotation.LayoutRes
+import androidx.annotation.MainThread
+import androidx.recyclerview.widget.DiffUtil
+import androidx.recyclerview.widget.RecyclerView
import io.reactivex.Single
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
-import java.util.ArrayList
+import java.util.*
/**
* A Base RecyclerViewAdapter with already implemented functions such as
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseViewHolder.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseViewHolder.kt
index 40fc9999..52d7f41b 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseViewHolder.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/BaseViewHolder.kt
@@ -2,8 +2,8 @@ package com.xmartlabs.bigbang.ui.common.recyclerview
import android.content.Context
import android.content.res.Resources
-import android.support.v7.widget.RecyclerView
import android.view.View
+import androidx.recyclerview.widget.RecyclerView
open class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) {
/**
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecycleItemType.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecycleItemType.kt
index 0d89587e..db7535da 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecycleItemType.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecycleItemType.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
-import android.support.v7.widget.RecyclerView
import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
/**
* A recycler view item, which relates an item [I] with a [android.support.v7.widget.RecyclerView.ViewHolder].
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewEmptySupport.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewEmptySupport.kt
index 743f95af..7bbc75c5 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewEmptySupport.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewEmptySupport.kt
@@ -1,11 +1,10 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
import android.content.Context
-import android.support.annotation.IdRes
-import android.support.v7.widget.RecyclerView
import android.util.AttributeSet
import android.view.View
-
+import androidx.annotation.IdRes
+import androidx.recyclerview.widget.RecyclerView
import com.xmartlabs.bigbang.ui.R
/**
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewGridSpacingDecoration.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewGridSpacingDecoration.kt
index 7bef189f..74cbfacd 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewGridSpacingDecoration.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/RecyclerViewGridSpacingDecoration.kt
@@ -1,12 +1,12 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
import android.graphics.Rect
-import android.support.annotation.Dimension
-import android.support.v7.widget.GridLayoutManager
-import android.support.v7.widget.RecyclerView
import android.view.View
+import androidx.annotation.Dimension
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.RecyclerView
import com.xmartlabs.bigbang.core.extensions.orDo
-import java.util.ArrayList
+import java.util.*
/**
* [RecyclerView.ItemDecoration] subclass designed to add spacing to item controlled by a [GridLayoutManager].
@@ -63,7 +63,7 @@ class RecyclerViewGridSpacingDecoration : RecyclerView.ItemDecoration() {
private val lastColumns = ArrayList()
private var biggestLastColumn: Int = 0
- override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State?) {
+ override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
if (parent.layoutManager !is GridLayoutManager) {
throw IllegalArgumentException("This Item Decoration can only be used with GridLayoutManager")
}
@@ -86,7 +86,7 @@ class RecyclerViewGridSpacingDecoration : RecyclerView.ItemDecoration() {
private fun setOffsetForItem(outRect: Rect, view: View, recyclerView: RecyclerView, gridLayoutManager: GridLayoutManager) {
val position = recyclerView.getChildLayoutPosition(view)
val spanCount = gridLayoutManager.spanCount
- val numberOfItems = recyclerView.adapter.itemCount
+ val numberOfItems = recyclerView.adapter!!.itemCount
val spanSizeLookup = gridLayoutManager.spanSizeLookup
itemOffsetConsumer?.invoke(outRect, recyclerView).orDo {
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseRecyclerViewAdapter.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseRecyclerViewAdapter.kt
index 10ee1e8d..63b0d0de 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseRecyclerViewAdapter.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseRecyclerViewAdapter.kt
@@ -1,8 +1,8 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
-import android.support.annotation.MainThread
-import android.support.v7.widget.RecyclerView
-import java.util.Arrays
+import androidx.annotation.MainThread
+import androidx.recyclerview.widget.RecyclerView
+import java.util.*
/**
* A Base RecyclerViewAdapter with already implemented functions such as
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseViewHolder.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseViewHolder.kt
index b0343be6..244f375c 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseViewHolder.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/common/recyclerview/SingleItemBaseViewHolder.kt
@@ -1,7 +1,7 @@
package com.xmartlabs.bigbang.ui.common.recyclerview
-import android.support.annotation.CallSuper
import android.view.View
+import androidx.annotation.CallSuper
/**
* View holder for a single item [T].
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/ActivityExtensions.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/ActivityExtensions.kt
index 883a870e..19885ddd 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/ActivityExtensions.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/ActivityExtensions.kt
@@ -3,9 +3,10 @@ package com.xmartlabs.bigbang.ui.extension
import android.app.Activity
import android.content.Context
import android.content.Intent
-import android.support.v4.app.Fragment
-import android.support.v7.app.AppCompatActivity
import android.view.inputmethod.InputMethodManager
+import androidx.appcompat.app.AppCompatActivity
+import androidx.fragment.app.Fragment
+
/** Hides the keyboard, if visible. */
fun Activity.hideKeyboard() {
diff --git a/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/FragmentExtensions.kt b/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/FragmentExtensions.kt
index 8e0be035..6eaeadbc 100644
--- a/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/FragmentExtensions.kt
+++ b/ui/src/main/java/com/xmartlabs/bigbang/ui/extension/FragmentExtensions.kt
@@ -1,6 +1,6 @@
package com.xmartlabs.bigbang.ui.extension
-import android.support.v4.app.Fragment
+import androidx.fragment.app.Fragment
/** Hides the keyboard, if visible. */
fun Fragment.hideKeyboard() {
diff --git a/ui/src/main/res/layout/activity_fragment_with_toolbar.xml b/ui/src/main/res/layout/activity_fragment_with_toolbar.xml
index f9e210fe..1ab8387c 100644
--- a/ui/src/main/res/layout/activity_fragment_with_toolbar.xml
+++ b/ui/src/main/res/layout/activity_fragment_with_toolbar.xml
@@ -1,5 +1,5 @@
-
-
-
-
+
-
+
diff --git a/versions.gradle b/versions.gradle
index 5654bc12..7bef6f80 100644
--- a/versions.gradle
+++ b/versions.gradle
@@ -2,48 +2,47 @@ ext {
applicationId = "com.xmartlabs.bigbang"
librariesVersionCode = 54
librariesVersion = '0.1.54'
- compileSdkVersion = 27
- minSdkVersion = 17
- targetSdkVersion = 27
- buildToolsVersion = '27.0.3'
+ compileSdkVersion = 29
+ minSdkVersion = 21
+ targetSdkVersion = 29
+ buildToolsVersion = '29.0.2'
vcsUrl = 'https://github.com/xmartlabs/bigbang.git'
websiteUrl = 'https://github.com/xmartlabs/bigbang'
libraryVersion = [
- androidSupport : '27.0.2',
- androidSupportTest : '1.0.1',
- archLifecycle : '1.1.1',
+ androidSupport : '1.0.0',
+ androidSupportTest : '1.1.1',
+ archLifecycle : '2.0.0',
butterKnife : '8.5.1',
crashlytics : '2.8.0@aar',
- dagger : '2.15',
+ dagger : '2.16',
dart : '2.0.0',
dbFlow : '4.1.2',
dexmaker : '1.4',
- espresso : '3.0.1',
+ espresso : '3.1.0',
firebase : '9.2.1',
fragmentArgs : '3.0.2',
gson : '2.8.0',
jsr305 : '3.0.1',
junit : '4.12',
- kotlin : '1.2.0',
+ kotlin : '1.3.61',
localDateBackport : '1.0.5',
materialDateTimePicker: '3.4.1',
mockito : '1.10.19',
ok2Curl : '0.3.1',
okHttp : '3.6.0',
okio : '1.11.0',
- parceler : '1.1.5',
picasso : '8c16e8564e',
playServices : '11.0.4',
restMock : '0.1.3',
retrofit : '2.2.0',
rxAndroid : '2.0.1',
rxJava : '2.1.7',
- rxLifecycle : '2.2.1',
+ rxLifecycle : '3.1.0',
threetenbp : '1.3.6',
timber : '4.7.0',
traceur : '05c2c81241',
- uiautomator : '2.1.3',
+ uiautomator : '2.2.0',
]
}