Skip to content

Commit

Permalink
Remove old support lib dependencies (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeissner authored and elgatovital committed Jul 11, 2019
1 parent b36cbbe commit ada85cf
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 51 deletions.
6 changes: 3 additions & 3 deletions android-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin"

//Android
implementation "com.android.support:appcompat-v7:$versions.android_support"
implementation "com.android.support:cardview-v7:$versions.android_support"
implementation "com.android.support:design:$versions.android_support"
implementation "androidx.appcompat:appcompat:$versions.androidx_app_compat"
implementation "androidx.cardview:cardview:$versions.androidx_card_view"
implementation "com.google.android.material:material:$versions.material"

//Rx
implementation "io.reactivex.rxjava2:rxjava:$versions.rxjava"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package pm.gnosis.svalinn.common.utils

import android.content.SharedPreferences
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentTransaction
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction

inline fun SharedPreferences.edit(func: SharedPreferences.Editor.() -> Unit) {
val editor = edit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import android.content.Context.VIBRATOR_SERVICE
import android.net.Uri
import android.os.Vibrator
import android.provider.Browser
import android.support.annotation.ColorRes
import android.support.annotation.PluralsRes
import android.support.annotation.RequiresPermission
import android.support.annotation.StringRes
import android.support.design.widget.Snackbar
import android.support.v4.content.ContextCompat
import android.view.View
import android.view.inputmethod.InputMethodManager
import android.widget.Toast
import androidx.annotation.ColorRes
import androidx.annotation.PluralsRes
import androidx.annotation.RequiresPermission
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import com.google.android.material.snackbar.Snackbar
import timber.log.Timber


Expand All @@ -28,17 +28,17 @@ fun Context.toast(@StringRes text: Int, duration: Int = Toast.LENGTH_LONG) {
Toast.makeText(this, text, duration).show()
}

fun snackbar(view: View, text: CharSequence, duration: Int = Snackbar.LENGTH_LONG, action: Pair<String, (View) -> Unit>? = null) {
val snackbar = Snackbar.make(view, text, duration)
action?.let { snackbar.setAction(it.first, it.second) }
snackbar.show()
}
fun snackbar(view: View, text: CharSequence, duration: Int = Snackbar.LENGTH_LONG, action: Pair<String, (View) -> Unit>? = null) =
Snackbar.make(view, text, duration).apply {
action?.let { setAction(it.first, it.second) }
show()
}

fun snackbar(view: View, @StringRes textId: Int, duration: Int = Snackbar.LENGTH_LONG, action: Pair<Int, (View) -> Unit>? = null) {
val snackbar = Snackbar.make(view, textId, duration)
action?.let { snackbar.setAction(it.first, it.second) }
snackbar.show()
}
fun snackbar(view: View, @StringRes textId: Int, duration: Int = Snackbar.LENGTH_LONG, action: Pair<Int, (View) -> Unit>? = null) =
Snackbar.make(view, textId, duration).apply {
action?.let { setAction(it.first, it.second) }
show()
}

fun Context.getSimplePlural(@PluralsRes stringId: Int, quantity: Long): String =
resources.getQuantityString(stringId, quantity.toInt(), quantity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pm.gnosis.svalinn.common.utils
import android.app.Activity
import android.graphics.Bitmap
import android.graphics.Color
import android.support.annotation.ColorInt
import android.support.v4.app.Fragment
import androidx.annotation.ColorInt
import androidx.fragment.app.Fragment
import com.google.zxing.BarcodeFormat
import com.google.zxing.WriterException
import com.google.zxing.qrcode.QRCodeWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;

import java.util.Arrays;
Expand All @@ -35,6 +34,8 @@
import java.util.List;
import java.util.Map;

import androidx.fragment.app.Fragment;

/**
* <p>A utility class which helps ease integration with Barcode Scanner via {@link Intent}s. This is a simple
* way to invoke barcode scanning and receive the result, without any need to integrate, modify, or learn the
Expand Down
47 changes: 25 additions & 22 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
ext {
versions = [
// Plug-Ins
android_tools : '3.3.0',
kotlin : '1.3.11',
jacoco : '0.7.9',
android_tools : '3.3.0',
kotlin : '1.3.11',
jacoco : '0.7.9',

// Runtime dependencies
android_support: '28.0.0',
android_room : '1.1.1',
bivrost : 'v0.7.1',
bouncycastle : '1.61',
geth : '1.7.1',
kethereum : '0.33',
moshi : '1.8.0',
okhttp : '3.11.0',
okio : '2.1.0',
retrofit : '2.4.0',
rxandroid : '2.1.0',
rxbinding : '2.1.1',
rxjava : '2.2.1',
rxkotlin : '2.3.0',
timber : '4.7.1',
zxing : '3.3.1',
androidx_app_compat : '1.0.2',
androidx_card_view : '1.0.0',
androidx_recycler_view: '1.0.0',
android_room : '1.1.1',
bivrost : 'v0.7.1',
bouncycastle : '1.61',
geth : '1.7.1',
kethereum : '0.33',
material : '1.0.0',
moshi : '1.8.0',
okhttp : '3.11.0',
okio : '2.1.0',
retrofit : '2.4.0',
rxandroid : '2.1.0',
rxbinding : '2.1.1',
rxjava : '2.2.1',
rxkotlin : '2.3.0',
timber : '4.7.1',
zxing : '3.3.1',

// Test dependencies
espresso : '3.0.0',
junit : '4.12',
mockito : '2.12.0',
espresso : '3.0.0',
junit : '4.12',
mockito : '2.12.0',
]
}
3 changes: 1 addition & 2 deletions utils-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ dependencies {
implementation "org.mockito:mockito-core:$versions.mockito"
implementation "org.mockito:mockito-inline:$versions.mockito"

implementation "com.android.support:appcompat-v7:$versions.android_support"
implementation "com.android.support:design:$versions.android_support"
implementation "androidx.recyclerview:recyclerview:$versions.androidx_recycler_view"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pm.gnosis.tests.utils

import android.support.v7.util.DiffUtil
import android.support.v7.util.ListUpdateCallback
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListUpdateCallback
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue

Expand Down

0 comments on commit ada85cf

Please sign in to comment.