DROID-1686 Tech | Target SDK 34 (#319)
This commit is contained in:
parent
d0d87ecac4
commit
1ca5bb5632
|
@ -2,7 +2,6 @@ plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
id "kotlin-android"
|
id "kotlin-android"
|
||||||
id "kotlin-kapt"
|
id "kotlin-kapt"
|
||||||
id "androidx.navigation.safeargs.kotlin"
|
|
||||||
id "com.google.firebase.appdistribution"
|
id "com.google.firebase.appdistribution"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +194,6 @@ dependencies {
|
||||||
implementation libs.composeAccompanistPager
|
implementation libs.composeAccompanistPager
|
||||||
implementation libs.composeAccompanistThemeAdapter
|
implementation libs.composeAccompanistThemeAdapter
|
||||||
implementation libs.composeAccompanistPagerIndicators
|
implementation libs.composeAccompanistPagerIndicators
|
||||||
implementation libs.composeAccompanistNavAnimation
|
|
||||||
implementation libs.preference
|
implementation libs.preference
|
||||||
implementation libs.activityCompose
|
implementation libs.activityCompose
|
||||||
implementation libs.composeReorderable
|
implementation libs.composeReorderable
|
||||||
|
|
|
@ -13,18 +13,18 @@ class CoroutinesTestRule(
|
||||||
private val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()
|
private val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()
|
||||||
) : TestWatcher() {
|
) : TestWatcher() {
|
||||||
|
|
||||||
override fun starting(description: Description?) {
|
override fun starting(description: Description) {
|
||||||
super.starting(description)
|
super.starting(description)
|
||||||
Dispatchers.setMain(testDispatcher)
|
Dispatchers.setMain(testDispatcher)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun finished(description: Description?) {
|
override fun finished(description: Description) {
|
||||||
super.finished(description)
|
super.finished(description)
|
||||||
Dispatchers.resetMain()
|
Dispatchers.resetMain()
|
||||||
testDispatcher.cleanupTestCoroutines()
|
testDispatcher.cleanupTestCoroutines()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun advanceTime(millis: Long) {
|
fun advanceTime(millis: Long) {
|
||||||
testDispatcher.advanceTimeBy(millis)
|
testDispatcher.scheduler.apply { advanceTimeBy(millis); runCurrent() }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,9 +16,8 @@ import androidx.activity.compose.ManagedActivityResultLauncher
|
||||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||||
import androidx.activity.result.ActivityResult
|
import androidx.activity.result.ActivityResult
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.compose.animation.AnimatedContentScope.SlideDirection.Companion.Left
|
import androidx.compose.animation.AnimatedContentTransitionScope.SlideDirection.Companion.Left
|
||||||
import androidx.compose.animation.AnimatedContentScope.SlideDirection.Companion.Right
|
import androidx.compose.animation.AnimatedContentTransitionScope.SlideDirection.Companion.Right
|
||||||
import androidx.compose.animation.ExperimentalAnimationApi
|
|
||||||
import androidx.compose.animation.core.tween
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.animation.fadeIn
|
import androidx.compose.animation.fadeIn
|
||||||
import androidx.compose.animation.fadeOut
|
import androidx.compose.animation.fadeOut
|
||||||
|
@ -55,10 +54,12 @@ import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.LifecycleOwner
|
|
||||||
import androidx.navigation.NavHostController
|
import androidx.navigation.NavHostController
|
||||||
|
import androidx.navigation.compose.NavHost
|
||||||
|
import androidx.navigation.compose.rememberNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.navigation.navOptions
|
import androidx.navigation.navOptions
|
||||||
|
import androidx.navigation.compose.composable
|
||||||
import com.anytypeio.anytype.R
|
import com.anytypeio.anytype.R
|
||||||
import com.anytypeio.anytype.core_ui.BuildConfig
|
import com.anytypeio.anytype.core_ui.BuildConfig
|
||||||
import com.anytypeio.anytype.core_ui.MNEMONIC_WORD_COUNT
|
import com.anytypeio.anytype.core_ui.MNEMONIC_WORD_COUNT
|
||||||
|
@ -66,7 +67,6 @@ import com.anytypeio.anytype.core_ui.MnemonicPhrasePaletteColors
|
||||||
import com.anytypeio.anytype.core_ui.views.BaseAlertDialog
|
import com.anytypeio.anytype.core_ui.views.BaseAlertDialog
|
||||||
import com.anytypeio.anytype.core_utils.ext.toast
|
import com.anytypeio.anytype.core_utils.ext.toast
|
||||||
import com.anytypeio.anytype.core_utils.insets.RootViewDeferringInsetsCallback
|
import com.anytypeio.anytype.core_utils.insets.RootViewDeferringInsetsCallback
|
||||||
import com.anytypeio.anytype.di.common.ComponentManager
|
|
||||||
import com.anytypeio.anytype.di.common.componentManager
|
import com.anytypeio.anytype.di.common.componentManager
|
||||||
import com.anytypeio.anytype.ext.daggerViewModel
|
import com.anytypeio.anytype.ext.daggerViewModel
|
||||||
import com.anytypeio.anytype.presentation.onboarding.OnboardingStartViewModel
|
import com.anytypeio.anytype.presentation.onboarding.OnboardingStartViewModel
|
||||||
|
@ -83,9 +83,6 @@ import com.anytypeio.anytype.ui.onboarding.screens.signup.CreateSoulAnimWrapper
|
||||||
import com.anytypeio.anytype.ui.onboarding.screens.signup.CreateSoulWrapper
|
import com.anytypeio.anytype.ui.onboarding.screens.signup.CreateSoulWrapper
|
||||||
import com.anytypeio.anytype.ui.onboarding.screens.signup.MnemonicPhraseScreenWrapper
|
import com.anytypeio.anytype.ui.onboarding.screens.signup.MnemonicPhraseScreenWrapper
|
||||||
import com.anytypeio.anytype.ui.onboarding.screens.signup.VoidScreenWrapper
|
import com.anytypeio.anytype.ui.onboarding.screens.signup.VoidScreenWrapper
|
||||||
import com.google.accompanist.navigation.animation.AnimatedNavHost
|
|
||||||
import com.google.accompanist.navigation.animation.composable
|
|
||||||
import com.google.accompanist.navigation.animation.rememberAnimatedNavController
|
|
||||||
import com.google.android.exoplayer2.ExoPlayer
|
import com.google.android.exoplayer2.ExoPlayer
|
||||||
import com.google.android.exoplayer2.MediaItem
|
import com.google.android.exoplayer2.MediaItem
|
||||||
import com.google.android.exoplayer2.Player
|
import com.google.android.exoplayer2.Player
|
||||||
|
@ -139,10 +136,9 @@ class OnboardingFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@OptIn(ExperimentalAnimationApi::class)
|
|
||||||
private fun OnboardingScreen() {
|
private fun OnboardingScreen() {
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
val navController = rememberAnimatedNavController()
|
val navController = rememberNavController()
|
||||||
val defaultBackCallback: BackButtonCallback = { navController.popBackStack() }
|
val defaultBackCallback: BackButtonCallback = { navController.popBackStack() }
|
||||||
val signUpBackButtonCallback = remember {
|
val signUpBackButtonCallback = remember {
|
||||||
mutableStateOf(defaultBackCallback)
|
mutableStateOf(defaultBackCallback)
|
||||||
|
@ -210,14 +206,13 @@ class OnboardingFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalAnimationApi::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun Onboarding(
|
private fun Onboarding(
|
||||||
currentPage: MutableState<OnboardingPage>,
|
currentPage: MutableState<OnboardingPage>,
|
||||||
backButtonCallback: MutableState<BackButtonCallback>,
|
backButtonCallback: MutableState<BackButtonCallback>,
|
||||||
navController: NavHostController
|
navController: NavHostController
|
||||||
) {
|
) {
|
||||||
AnimatedNavHost(navController, startDestination = OnboardingNavigation.auth) {
|
NavHost(navController, startDestination = OnboardingNavigation.auth) {
|
||||||
composable(
|
composable(
|
||||||
route = OnboardingNavigation.auth,
|
route = OnboardingNavigation.auth,
|
||||||
enterTransition = { null },
|
enterTransition = { null },
|
||||||
|
@ -413,7 +408,7 @@ class OnboardingFragment : Fragment() {
|
||||||
vm.sideEffects.collect { effect ->
|
vm.sideEffects.collect { effect ->
|
||||||
when (effect) {
|
when (effect) {
|
||||||
is OnboardingMnemonicLoginViewModel.SideEffect.Exit -> {
|
is OnboardingMnemonicLoginViewModel.SideEffect.Exit -> {
|
||||||
val lastDestination = navController.backQueue.lastOrNull()
|
val lastDestination = navController.currentBackStackEntry
|
||||||
// TODO Temporary workaround to prevent inconsistent state in navigation
|
// TODO Temporary workaround to prevent inconsistent state in navigation
|
||||||
if (lastDestination?.destination?.route == OnboardingNavigation.recovery) {
|
if (lastDestination?.destination?.route == OnboardingNavigation.recovery) {
|
||||||
navController.popBackStack()
|
navController.popBackStack()
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import com.android.build.gradle.LibraryPlugin
|
import com.android.build.gradle.LibraryPlugin
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.compile_sdk = 33
|
ext.compile_sdk = 34
|
||||||
ext.target_sdk = 33
|
ext.target_sdk = 34
|
||||||
ext.min_sdk = 26
|
ext.min_sdk = 26
|
||||||
|
|
||||||
ext.application_id = 'io.anytype.app'
|
ext.application_id = 'io.anytype.app'
|
||||||
|
@ -43,7 +43,6 @@ plugins {
|
||||||
alias(libs.plugins.wire) apply false
|
alias(libs.plugins.wire) apply false
|
||||||
alias(libs.plugins.dokka) apply false
|
alias(libs.plugins.dokka) apply false
|
||||||
alias(libs.plugins.firebaseDistribution) apply false
|
alias(libs.plugins.firebaseDistribution) apply false
|
||||||
alias(libs.plugins.navigation) apply false
|
|
||||||
alias(libs.plugins.gms) apply false
|
alias(libs.plugins.gms) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.anytypeio.anytype.core_ui.widgets.text
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.graphics.Canvas
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import androidx.appcompat.widget.AppCompatTextView
|
|
||||||
|
|
||||||
class StaticTextView @JvmOverloads constructor(
|
|
||||||
context: Context,
|
|
||||||
attrs: AttributeSet? = null,
|
|
||||||
defStyleAttr: Int = 0
|
|
||||||
) : AppCompatTextView(context, attrs, defStyleAttr) {
|
|
||||||
|
|
||||||
var textToSet: String = ""
|
|
||||||
var xTextPosition: Float = 0f
|
|
||||||
|
|
||||||
override fun onDraw(canvas: Canvas?) {
|
|
||||||
super.onDraw(canvas)
|
|
||||||
//todo Fix y position after proper design
|
|
||||||
canvas?.drawText(textToSet, xTextPosition, 45f, paint)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -33,9 +33,9 @@ class TextHighlightWidget @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDraw(canvas: Canvas?) {
|
override fun onDraw(canvas: Canvas) {
|
||||||
if (text is Spanned && layout != null) {
|
if (text is Spanned && layout != null) {
|
||||||
canvas?.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) {
|
canvas.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) {
|
||||||
highlightDrawer?.draw(
|
highlightDrawer?.draw(
|
||||||
canvas = canvas,
|
canvas = canvas,
|
||||||
text = text as Spanned,
|
text = text as Spanned,
|
||||||
|
|
|
@ -25,7 +25,6 @@ import com.anytypeio.anytype.core_ui.tools.MentionTextWatcher
|
||||||
import com.anytypeio.anytype.core_ui.tools.TextInputTextWatcher
|
import com.anytypeio.anytype.core_ui.tools.TextInputTextWatcher
|
||||||
import com.anytypeio.anytype.core_ui.widgets.text.highlight.HighlightAttributeReader
|
import com.anytypeio.anytype.core_ui.widgets.text.highlight.HighlightAttributeReader
|
||||||
import com.anytypeio.anytype.core_ui.widgets.text.highlight.HighlightDrawer
|
import com.anytypeio.anytype.core_ui.widgets.text.highlight.HighlightDrawer
|
||||||
import com.anytypeio.anytype.core_utils.ext.multilineIme
|
|
||||||
import com.anytypeio.anytype.core_utils.ext.showKeyboard
|
import com.anytypeio.anytype.core_utils.ext.showKeyboard
|
||||||
import com.anytypeio.anytype.core_utils.text.OnEnterActionListener
|
import com.anytypeio.anytype.core_utils.text.OnEnterActionListener
|
||||||
import com.anytypeio.anytype.presentation.editor.editor.model.BlockView
|
import com.anytypeio.anytype.presentation.editor.editor.model.BlockView
|
||||||
|
@ -248,10 +247,10 @@ class TextInputWidget : AppCompatEditText {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDraw(canvas: Canvas?) {
|
override fun onDraw(canvas: Canvas) {
|
||||||
// need to draw bg first so that text can be on top during super.onDraw()
|
// need to draw bg first so that text can be on top during super.onDraw()
|
||||||
if (text is Spanned && layout != null) {
|
if (text is Spanned && layout != null) {
|
||||||
canvas?.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) {
|
canvas.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) {
|
||||||
highlightDrawer?.draw(canvas, text as Spanned, layout, context.resources)
|
highlightDrawer?.draw(canvas, text as Spanned, layout, context.resources)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import android.view.MotionEvent
|
||||||
abstract class OnSwipeListener : SimpleOnGestureListener() {
|
abstract class OnSwipeListener : SimpleOnGestureListener() {
|
||||||
|
|
||||||
override fun onFling(
|
override fun onFling(
|
||||||
e1: MotionEvent,
|
e1: MotionEvent?,
|
||||||
e2: MotionEvent,
|
e2: MotionEvent,
|
||||||
velocityX: Float,
|
velocityX: Float,
|
||||||
velocityY: Float
|
velocityY: Float
|
||||||
|
@ -34,8 +34,8 @@ abstract class OnSwipeListener : SimpleOnGestureListener() {
|
||||||
// C => it's a DOWN swipe
|
// C => it's a DOWN swipe
|
||||||
// D => it's a LEFT swipe
|
// D => it's a LEFT swipe
|
||||||
//
|
//
|
||||||
val x1 = e1.x
|
val x1 = e1?.x ?: 0f
|
||||||
val y1 = e1.y
|
val y1 = e1?.y ?: 0f
|
||||||
val x2 = e2.x
|
val x2 = e2.x
|
||||||
val y2 = e2.y
|
val y2 = e2.y
|
||||||
val direction = getDirection(x1, y1, x2, y2)
|
val direction = getDirection(x1, y1, x2, y2)
|
||||||
|
|
|
@ -4,17 +4,17 @@ kotlinVersion = '1.7.10'
|
||||||
|
|
||||||
androidxCoreVersion = "1.10.1"
|
androidxCoreVersion = "1.10.1"
|
||||||
|
|
||||||
androidxComposeVersion = '1.4.3'
|
androidxComposeVersion = '1.5.0'
|
||||||
composeKotlinCompilerVersion = '1.3.1'
|
composeKotlinCompilerVersion = '1.3.1'
|
||||||
composeMaterial3Version = '1.1.1'
|
composeMaterial3Version = '1.1.1'
|
||||||
composeMaterialVersion = '1.3.1'
|
composeMaterialVersion = '1.5.0'
|
||||||
composeConstraintLayoutVersion = '1.0.1'
|
composeConstraintLayoutVersion = '1.0.1'
|
||||||
|
|
||||||
activityComposeVersion = '1.7.2'
|
activityComposeVersion = '1.7.2'
|
||||||
composeReorderableVersion = '0.9.6'
|
composeReorderableVersion = '0.9.6'
|
||||||
accompanistVersion = "0.29.1-alpha"
|
accompanistVersion = "0.29.1-alpha"
|
||||||
appcompatVersion = '1.6.1'
|
appcompatVersion = '1.6.1'
|
||||||
fragmentVersion = "1.6.0"
|
fragmentVersion = "1.6.1"
|
||||||
exoplayerVersion = "2.19.0"
|
exoplayerVersion = "2.19.0"
|
||||||
wireVersion = "4.5.2"
|
wireVersion = "4.5.2"
|
||||||
glideVersion = "4.14.2"
|
glideVersion = "4.14.2"
|
||||||
|
@ -29,14 +29,14 @@ androidxCoreTestingVersion = '2.2.0'
|
||||||
androidxSecurityCryptoVersion = '1.0.0'
|
androidxSecurityCryptoVersion = '1.0.0'
|
||||||
androidxPreferenceVersion = '1.2.1'
|
androidxPreferenceVersion = '1.2.1'
|
||||||
constraintLayoutVersion = '2.1.4'
|
constraintLayoutVersion = '2.1.4'
|
||||||
recyclerviewVersion = '1.3.0'
|
recyclerviewVersion = '1.3.1'
|
||||||
cardviewVersion = '1.0.0'
|
cardviewVersion = '1.0.0'
|
||||||
emojiCompatVersion = '1.1.0'
|
emojiCompatVersion = '1.1.0'
|
||||||
viewPager2Version = '1.0.0'
|
viewPager2Version = '1.0.0'
|
||||||
lifecycleVersion = '2.5.1'
|
lifecycleVersion = '2.6.1'
|
||||||
lifecycleRuntimeComposeVersion = '2.6.0-alpha02'
|
lifecycleRuntimeComposeVersion = '2.7.0-alpha01'
|
||||||
navigationVersion = '2.5.3'
|
navigationVersion = '2.7.1'
|
||||||
navigationComposeVersion = '2.5.3'
|
navigationComposeVersion = '2.7.1'
|
||||||
shimmerLayoutVersion = '0.5.0'
|
shimmerLayoutVersion = '0.5.0'
|
||||||
photoViewVersion = '2.3.0'
|
photoViewVersion = '2.3.0'
|
||||||
daggerVersion = '2.45'
|
daggerVersion = '2.45'
|
||||||
|
@ -48,7 +48,7 @@ picktVersion = '2.0.2'
|
||||||
zxingVersion = '4.1.0'
|
zxingVersion = '4.1.0'
|
||||||
urlcleanerVersion = '0.4.0'
|
urlcleanerVersion = '0.4.0'
|
||||||
katexVersion = '1.0.2'
|
katexVersion = '1.0.2'
|
||||||
robolectricLatestVersion = '4.9.2'
|
robolectricLatestVersion = '4.10.3'
|
||||||
kluentVersion = '1.14'
|
kluentVersion = '1.14'
|
||||||
timberJunitVersion = '1.0.1'
|
timberJunitVersion = '1.0.1'
|
||||||
turbineVersion = '0.12.1'
|
turbineVersion = '0.12.1'
|
||||||
|
@ -60,7 +60,7 @@ leakCanaryVersion = '1.5'
|
||||||
timberVersion = '5.0.1'
|
timberVersion = '5.0.1'
|
||||||
protobufJavaVersion = '3.9.2'
|
protobufJavaVersion = '3.9.2'
|
||||||
protocVersion = '3.9.0'
|
protocVersion = '3.9.0'
|
||||||
roomVersion = '2.4.3'
|
roomVersion = '2.5.2'
|
||||||
amplitudeVersion = '2.36.1'
|
amplitudeVersion = '2.36.1'
|
||||||
coilComposeVersion = '2.2.2'
|
coilComposeVersion = '2.2.2'
|
||||||
sentryVersion = '6.0.0'
|
sentryVersion = '6.0.0'
|
||||||
|
@ -79,7 +79,6 @@ composeMaterial3 = { module = "androidx.compose.material3:material3", version.re
|
||||||
composeAccompanistPager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanistVersion" }
|
composeAccompanistPager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanistVersion" }
|
||||||
composeAccompanistPagerIndicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanistVersion" }
|
composeAccompanistPagerIndicators = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "accompanistVersion" }
|
||||||
composeAccompanistThemeAdapter = { module = "com.google.accompanist:accompanist-themeadapter-material", version.ref = "accompanistVersion" }
|
composeAccompanistThemeAdapter = { module = "com.google.accompanist:accompanist-themeadapter-material", version.ref = "accompanistVersion" }
|
||||||
composeAccompanistNavAnimation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanistVersion" }
|
|
||||||
composeReorderable = { module = "org.burnoutcrew.composereorderable:reorderable", version.ref = "composeReorderableVersion" }
|
composeReorderable = { module = "org.burnoutcrew.composereorderable:reorderable", version.ref = "composeReorderableVersion" }
|
||||||
composeConstraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "composeConstraintLayoutVersion" }
|
composeConstraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "composeConstraintLayoutVersion" }
|
||||||
kotlinxSerializationJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.4.1" }
|
kotlinxSerializationJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.4.1" }
|
||||||
|
@ -170,7 +169,5 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "kotlinVersion" }
|
||||||
kserialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinVersion" }
|
kserialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinVersion" }
|
||||||
wire = { id = "com.squareup.wire", version = "4.4.3" }
|
wire = { id = "com.squareup.wire", version = "4.4.3" }
|
||||||
firebaseDistribution = { id = "com.google.firebase.appdistribution", version = "3.1.1" }
|
firebaseDistribution = { id = "com.google.firebase.appdistribution", version = "3.1.1" }
|
||||||
navigation = { id = "androidx.navigation.safeargs", version.ref = "navigationVersion" }
|
|
||||||
navigationKotlin = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigationVersion" }
|
|
||||||
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlinVersion" }
|
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlinVersion" }
|
||||||
gms = { id = "com.google.gms.google-services", version = "4.3.15" }
|
gms = { id = "com.google.gms.google-services", version = "4.3.15" }
|
|
@ -18,7 +18,7 @@ import org.robolectric.RobolectricTestRunner
|
||||||
import org.robolectric.annotation.Config
|
import org.robolectric.annotation.Config
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(RobolectricTestRunner::class)
|
||||||
@Config(manifest = Config.NONE)
|
@Config(manifest = Config.NONE, sdk = [33])
|
||||||
class AccountDaoTest {
|
class AccountDaoTest {
|
||||||
|
|
||||||
@get:Rule
|
@get:Rule
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.robolectric.RuntimeEnvironment
|
||||||
import org.robolectric.annotation.Config
|
import org.robolectric.annotation.Config
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(RobolectricTestRunner::class)
|
||||||
@Config(manifest = Config.NONE)
|
@Config(manifest = Config.NONE, sdk = [33])
|
||||||
class DefaultAuthCacheTest {
|
class DefaultAuthCacheTest {
|
||||||
|
|
||||||
@get:Rule
|
@get:Rule
|
||||||
|
|
|
@ -13,20 +13,20 @@ class CoroutinesTestRule(
|
||||||
val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()
|
val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()
|
||||||
) : TestWatcher() {
|
) : TestWatcher() {
|
||||||
|
|
||||||
override fun starting(description: Description?) {
|
override fun starting(description: Description) {
|
||||||
super.starting(description)
|
super.starting(description)
|
||||||
Dispatchers.setMain(testDispatcher)
|
Dispatchers.setMain(testDispatcher)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun finished(description: Description?) {
|
override fun finished(description: Description) {
|
||||||
super.finished(description)
|
super.finished(description)
|
||||||
Dispatchers.resetMain()
|
Dispatchers.resetMain()
|
||||||
testDispatcher.cleanupTestCoroutines()
|
testDispatcher.cleanupTestCoroutines()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun advanceTime(millis: Long) {
|
fun advanceTime(millis: Long) {
|
||||||
testDispatcher.advanceTimeBy(millis)
|
testDispatcher.scheduler.apply { advanceTimeBy(millis); runCurrent() }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun advanceUntilIdle() = testDispatcher.advanceUntilIdle()
|
fun advanceUntilIdle() = testDispatcher.scheduler.advanceUntilIdle()
|
||||||
}
|
}
|
|
@ -7,13 +7,13 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 33
|
compileSdkVersion 34
|
||||||
buildToolsVersion "32.0.0"
|
buildToolsVersion "32.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.anytypeio.anytype.sample"
|
applicationId "com.anytypeio.anytype.sample"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 33
|
targetSdkVersion 34
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user