Skip to content

Commit

Permalink
feat: Migrated project to Android X and Updated dependencies accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijitramesh authored and therajanmaurya committed Jun 14, 2019
1 parent b5d2115 commit a006a93
Show file tree
Hide file tree
Showing 70 changed files with 269 additions and 267 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android:
- extra-google-google_play_services
- extra-android-m2repository
- extra-google-m2repository
- build-tools-27.0.3
- android-27
- build-tools-28.0.3
- android-28
- android-22
- sys-img-armeabi-v7a-android-22
- platform-tools
Expand Down
34 changes: 17 additions & 17 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
applicationId "org.mifos.mobile.cn"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
Expand Down Expand Up @@ -81,13 +81,13 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"

// Support Dependencies
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support.test.espresso:espresso-idling-resource:$rootProject.espressoVersion"
implementation "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation "androidx.appcompat:appcompat:$rootProject.supportLibraryVersion"
implementation "com.google.android.material:material:$rootProject.supportLibraryVersion"
implementation "androidx.recyclerview:recyclerview:$rootProject.supportLibraryVersion"
implementation "androidx.cardview:cardview:$rootProject.supportLibraryVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$rootProject.espressoVersion"
implementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.mifos.mobile:mifos-passcode:$rootProject.passcodeLibraryVersion"
// Rx Dependencies
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjavaVersion"
Expand Down Expand Up @@ -120,8 +120,8 @@ dependencies {
implementation "com.stepstone.stepper:material-stepper:$rootProject.stepperVersion"

// Glide for Image Loading
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.github.bumptech.glide:glide:4.8.0'
kapt 'com.github.bumptech.glide:compiler:4.8.0'

//dbFlow for database
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:$rootProject.dbFlowVersion"
Expand All @@ -135,22 +135,22 @@ dependencies {
androidTestImplementation jUnit
androidTestImplementation mockito
androidTestImplementation "org.mockito:mockito-android:$rootProject.mockitoVersion"
androidTestImplementation "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:$rootProject.espressoVersion") {
androidTestImplementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
androidTestImplementation("androidx.test.espresso:espresso-contrib:$rootProject.espressoVersion") {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "com.android.support.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestImplementation "com.android.support.test:runner:$rootProject.runnerVersion"
androidTestImplementation "com.android.support.test:rules:$rootProject.rulesVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestImplementation "androidx.test:runner:$rootProject.runnerVersion"
androidTestImplementation "androidx.test:rules:$rootProject.rulesVersion"

// Unit tests dependencies
testImplementation jUnit
testImplementation mockito
testImplementation "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
testImplementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
testImplementation "org.hamcrest:hamcrest-core:$rootProject.hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-library:$rootProject.hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-integration:$rootProject.hamcrestVersion"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.mifos.mobile.cn

import android.app.Application
import android.content.Context
import android.support.v7.app.AppCompatDelegate
import androidx.appcompat.app.AppCompatDelegate
import com.facebook.stetho.Stetho
import com.mifos.mobile.passcode.utils.ForegroundChecker
import com.raizlabs.android.dbflow.config.FlowManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn.data.remote

import android.content.Context
import android.support.annotation.NonNull
import androidx.annotation.NonNull
import android.text.TextUtils
import okhttp3.Interceptor
import okhttp3.Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.content.res.ColorStateList
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.support.v4.content.ContextCompat
import android.support.v7.widget.RecyclerView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -56,7 +56,7 @@ constructor(@ApplicationContext val context: Context) :
}


inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view) {
inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view!!) {

val ivStatusIndicator = view?.iv_status_indicator

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.mifos.mobile.cn.ui.adapter

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -66,7 +66,7 @@ constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter<Loa
}


inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view) {
inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view!!) {

val tvLoanIdentifier = view?.tv_loan_identifier

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mifos.mobile.cn.ui.adapter

import android.support.v4.app.FragmentManager
import androidx.fragment.app.FragmentManager
import android.content.Context
import com.stepstone.stepper.Step
import com.stepstone.stepper.adapter.AbstractFragmentStepAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mifos.mobile.cn.ui.adapter

import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobile.cn.ui.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import java.util.ArrayList

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.mifos.mobile.cn.ui.base

import android.support.v7.widget.Toolbar
import androidx.appcompat.widget.Toolbar

interface BaseActivityCallback {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package org.mifos.mobile.cn.ui.base
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.view.ViewCompat
import android.support.v7.widget.Toolbar
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.core.view.ViewCompat
import androidx.appcompat.widget.Toolbar
import android.view.MenuItem
import android.view.View
import android.view.inputmethod.InputMethodManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package org.mifos.mobile.cn.ui.base
import android.app.Activity
import android.content.Context
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v7.widget.Toolbar
import androidx.fragment.app.Fragment
import androidx.appcompat.widget.Toolbar
import android.view.View
import android.view.inputmethod.InputMethodManager
import org.mifos.mobile.cn.ui.utils.ProgressBarHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import android.content.DialogInterface
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.support.design.widget.NavigationView
import android.support.v4.app.FragmentManager
import android.support.v4.view.GravityCompat
import android.support.v7.app.ActionBarDrawerToggle
import com.google.android.material.navigation.NavigationView
import androidx.fragment.app.FragmentManager
import androidx.core.view.GravityCompat
import androidx.appcompat.app.ActionBarDrawerToggle
import android.view.MenuItem
import android.view.View
import android.view.inputmethod.InputMethodManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobile.cn.ui.mifos.accounts

import android.os.Bundle
import android.support.v7.widget.DividerItemDecoration
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package org.mifos.mobile.cn.ui.mifos.accountsFilter
import android.app.Dialog
import android.content.DialogInterface
import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.design.widget.BottomSheetDialog
import android.support.design.widget.BottomSheetDialogFragment
import android.support.v7.widget.LinearLayoutManager
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import androidx.recyclerview.widget.LinearLayoutManager
import android.view.View
import kotlinx.android.synthetic.main.bottom_sheet_filter_accounts.view.*
import org.mifos.mobile.cn.R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package org.mifos.mobile.cn.ui.mifos.customerAccounts
import android.app.SearchManager
import android.content.Context
import android.os.Bundle
import android.support.v4.view.ViewPager
import android.support.v7.widget.SearchView
import androidx.viewpager.widget.ViewPager
import androidx.appcompat.widget.SearchView
import android.view.*
import android.widget.Toast
import kotlinx.android.synthetic.main.fragment_client_accounts.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobile.cn.ui.mifos.customerActivities

import android.os.Bundle
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
import android.util.Log
import android.view.LayoutInflater
import android.view.View
Expand All @@ -18,7 +18,7 @@ import org.mifos.mobile.cn.ui.utils.ConstantKeys
import javax.annotation.Nullable
import javax.inject.Inject

class CustomerActivitiesFragment: MifosBaseFragment(),CustomerAcitivitesContracts.View,SwipeRefreshLayout.OnRefreshListener {
class CustomerActivitiesFragment: MifosBaseFragment(),CustomerAcitivitesContracts.View, SwipeRefreshLayout.OnRefreshListener {

lateinit var rootView: View
lateinit var customerIdentifier: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package org.mifos.mobile.cn.ui.mifos.customerDetails

import android.content.Intent
import android.os.Bundle
import android.support.design.widget.AppBarLayout
import android.support.design.widget.CollapsingToolbarLayout
import android.support.v7.app.AppCompatActivity
import com.google.android.material.appbar.AppBarLayout
import com.google.android.material.appbar.CollapsingToolbarLayout
import androidx.appcompat.app.AppCompatActivity

import android.view.LayoutInflater
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.mifos.mobile.cn.ui.mifos.identificationdetails

import android.content.Intent
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import android.view.*
import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_identification_details.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.mifos.mobile.cn.ui.mifos.identificationlist
import android.app.SearchManager
import android.content.Context
import android.os.Bundle
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.SearchView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.appcompat.widget.SearchView
import android.text.TextUtils
import android.view.*
import kotlinx.android.synthetic.main.fragment_identification_list.*
Expand All @@ -23,7 +23,7 @@ import javax.annotation.Nonnull
import javax.annotation.Nullable
import javax.inject.Inject

class IdentificationsFragment : MifosBaseFragment(),IdentificationsContract.Views,OnItemClickListener,SwipeRefreshLayout.OnRefreshListener{
class IdentificationsFragment : MifosBaseFragment(),IdentificationsContract.Views,OnItemClickListener, SwipeRefreshLayout.OnRefreshListener{

lateinit var rootView: View
lateinit var identifications: List<Identification>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.mifos.mobile.cn.ui.mifos.loanApplication
import android.app.Dialog
import android.content.DialogInterface
import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.design.widget.BottomSheetDialog
import android.support.design.widget.BottomSheetDialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import android.text.TextUtils
import android.view.View
import android.widget.Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.mifos.mobile.cn.ui.mifos.loanApplication

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 android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Loading

0 comments on commit a006a93

Please sign in to comment.