mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-19 11:32:15 +02:00
Dependency updates 20230630 (#14058)
* Bump com.squareup.leakcanary:leakcanary-android from 2.11 to 2.12 Bumps [com.squareup.leakcanary:leakcanary-android](https://github.com/square/leakcanary) from 2.11 to 2.12. - [Release notes](https://github.com/square/leakcanary/releases) - [Changelog](https://github.com/square/leakcanary/blob/main/docs/changelog.md) - [Commits](https://github.com/square/leakcanary/compare/v2.11...v2.12) --- updated-dependencies: - dependency-name: com.squareup.leakcanary:leakcanary-android dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump org.jetbrains.kotlinx:kotlinx-coroutines-test from 1.7.1 to 1.7.2 Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-test](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.7.1...1.7.2) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump com.github.triplet.play from 3.8.3 to 3.8.4 Bumps com.github.triplet.play from 3.8.3 to 3.8.4. --- updated-dependencies: - dependency-name: com.github.triplet.play dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump com.android.tools.build:gradle from 7.4.2 to 8.0.2 (#13912) * Bump com.android.tools.build:gradle from 7.4.2 to 8.0.2 Bumps com.android.tools.build:gradle from 7.4.2 to 8.0.2. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): forward-port BuildConfig / aidl / default-component to gradle 8 * convert to non-transitive R.attr style - directly address the attributes via their specific names - remove an R-containing IntDef since R is no longer constant (the whole UndoAction class will disappear with new backend anyway) * Use attrs directly from `android` Practically, it is a non-functional change, but is is best and more natural to use attrs directly from android instead of using `com.google.android.material` as a intermediate --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Hardy <github@mikehardy.net> Co-authored-by: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brayan Oliveira <69634269+brayandso@users.noreply.github.com>
This commit is contained in:
parent
8d6f5def38
commit
f8ea30d275
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
// Gradle plugin portal
|
||||
id 'com.github.triplet.play' version '3.8.3'
|
||||
id 'com.github.triplet.play' version '3.8.4'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
@ -30,6 +30,11 @@ android {
|
||||
|
||||
compileSdkVersion 33 // change api compileSdkVersion at the same time
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
aidl = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.ichi2.anki"
|
||||
buildConfigField "Boolean", "CI", (System.getenv("CI") == "true").toString()
|
||||
@ -358,7 +363,7 @@ dependencies {
|
||||
// Cannot use debugImplementation since classes need to be imported in AnkiDroidApp
|
||||
// and there's no no-op version for release build. Usage has been disabled for release
|
||||
// build via AnkiDroidApp.
|
||||
implementation 'com.squareup.leakcanary:leakcanary-android:2.11'
|
||||
implementation 'com.squareup.leakcanary:leakcanary-android:2.12'
|
||||
|
||||
api project(":api")
|
||||
|
||||
|
@ -106,7 +106,7 @@ class DeckPickerTest {
|
||||
onView(withId(R.id.fab_main)).perform(click())
|
||||
onView(withId(R.id.add_deck_action)).perform(click())
|
||||
onView(withId(R.id.action_edit)).perform(typeText("TestDeck$testString"))
|
||||
onView(withId(R.id.md_button_positive)).perform(click())
|
||||
onView(withId(com.afollestad.materialdialogs.R.id.md_button_positive)).perform(click())
|
||||
|
||||
// The deck is currently empty, so if we tap on it, it becomes the selected deck but doesn't enter
|
||||
onView(withId(R.id.files)).perform(
|
||||
|
@ -407,7 +407,7 @@ open class AnkiActivity : AppCompatActivity, SimpleMessageDialogListener, Collec
|
||||
)
|
||||
return
|
||||
}
|
||||
val toolbarColor = Themes.getColorFromAttr(this, R.attr.colorPrimary)
|
||||
val toolbarColor = Themes.getColorFromAttr(this, android.R.attr.colorPrimary)
|
||||
val navBarColor = Themes.getColorFromAttr(this, R.attr.customTabNavBarColor)
|
||||
val colorSchemeParams = CustomTabColorSchemeParams.Builder()
|
||||
.setToolbarColor(toolbarColor)
|
||||
|
@ -94,7 +94,7 @@ class Info : AnkiActivity() {
|
||||
val backgroundColor = typedArray.getColor(0, -1)
|
||||
val textColor = typedArray.getColor(1, -1).toRGBHex()
|
||||
|
||||
val anchorTextThemeColor = ThemeUtils.getThemeAttrColor(this, R.attr.colorAccent)
|
||||
val anchorTextThemeColor = ThemeUtils.getThemeAttrColor(this, android.R.attr.colorAccent)
|
||||
val anchorTextColor = anchorTextThemeColor.toRGBHex()
|
||||
|
||||
mWebView!!.setBackgroundColor(backgroundColor)
|
||||
|
@ -116,7 +116,7 @@ abstract class NavigationDrawerActivity :
|
||||
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START)
|
||||
// Force transparent status bar with primary dark color underlaid so that the drawer displays under status bar
|
||||
window.statusBarColor = ContextCompat.getColor(this, R.color.transparent)
|
||||
mDrawerLayout.setStatusBarBackgroundColor(Themes.getColorFromAttr(this, R.attr.colorPrimary))
|
||||
mDrawerLayout.setStatusBarBackgroundColor(Themes.getColorFromAttr(this, android.R.attr.colorPrimary))
|
||||
// Setup toolbar and hamburger
|
||||
mNavigationView = mDrawerLayout.findViewById(R.id.navdrawer_items_container)
|
||||
mNavigationView.setNavigationItemSelectedListener(this)
|
||||
|
@ -1324,7 +1324,7 @@ open class Reviewer :
|
||||
// Show / hide the Action bar together with the status bar
|
||||
val prefs = AnkiDroidApp.getSharedPrefs(a)
|
||||
val fullscreenMode = fromPreference(prefs)
|
||||
a.window.statusBarColor = getColorFromAttr(a, R.attr.colorPrimary)
|
||||
a.window.statusBarColor = getColorFromAttr(a, android.R.attr.colorPrimary)
|
||||
val decorView = a.window.decorView
|
||||
decorView.setOnSystemUiVisibilityChangeListener { flags: Int ->
|
||||
val toolbar = a.findViewById<View>(R.id.toolbar)
|
||||
@ -1559,7 +1559,7 @@ open class Reviewer :
|
||||
@MenuRes subMenuRes: Int,
|
||||
onMenuItemSelection: (MenuItem) -> Boolean,
|
||||
showsSubMenu: () -> Boolean
|
||||
): View = ImageButton(context, null, R.attr.actionButtonStyle).apply {
|
||||
): View = ImageButton(context, null, android.R.attr.actionButtonStyle).apply {
|
||||
TooltipCompat.setTooltipText(this, menuItem.title)
|
||||
menuItem.icon?.isAutoMirrored = true
|
||||
setImageDrawable(menuItem.icon)
|
||||
|
@ -210,7 +210,7 @@ class TagsDialog : AnalyticsDialogFragment {
|
||||
mToolbarSearchItem = toolbar.menu.findItem(R.id.tags_dialog_action_filter)
|
||||
val toolbarSearchItem: MenuItem? = mToolbarSearchItem
|
||||
mToolbarSearchView = toolbarSearchItem?.actionView as SearchView
|
||||
val queryET = mToolbarSearchView!!.findViewById<EditText>(R.id.search_src_text)
|
||||
val queryET = mToolbarSearchView!!.findViewById<EditText>(com.google.android.material.R.id.search_src_text)
|
||||
queryET.filters = arrayOf(addTagFilter)
|
||||
mToolbarSearchView!!.queryHint = getString(R.string.filter_tags)
|
||||
mToolbarSearchView!!.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
|
||||
|
@ -17,9 +17,7 @@
|
||||
package com.ichi2.libanki
|
||||
|
||||
import android.content.res.Resources
|
||||
import androidx.annotation.IntDef
|
||||
import androidx.annotation.StringRes
|
||||
import com.ichi2.anki.R
|
||||
import com.ichi2.utils.LanguageUtil.getLocaleCompat
|
||||
import timber.log.Timber
|
||||
import java.util.*
|
||||
@ -32,7 +30,6 @@ abstract class UndoAction
|
||||
val undoNameId: Int
|
||||
) {
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@IntDef(R.string.undo_action_change_deck_multi, R.string.menu_delete_note, R.string.card_browser_delete_card, R.string.card_browser_mark_card, R.string.card_browser_unmark_card, R.string.menu_suspend_card, R.string.card_browser_unsuspend_card, R.string.undo_action_review, R.string.menu_bury_note, R.string.menu_suspend_note, R.string.card_editor_reposition_card, R.string.card_editor_reschedule_card, R.string.menu_bury_card, R.string.card_editor_reset_card)
|
||||
annotation class UndoNameId
|
||||
|
||||
private fun getLocale(resources: Resources): Locale? {
|
||||
|
@ -30,8 +30,8 @@ class HeaderPreference
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = R.attr.preferenceStyle,
|
||||
defStyleRes: Int = R.style.Preference
|
||||
defStyleAttr: Int = androidx.preference.R.attr.preferenceStyle,
|
||||
defStyleRes: Int = androidx.preference.R.style.Preference
|
||||
) : Preference(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
init {
|
||||
|
@ -36,8 +36,8 @@ open class NumberRangePreferenceCompat
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = R.attr.editTextPreferenceStyle,
|
||||
defStyleRes: Int = R.style.Preference_DialogPreference_EditTextPreference
|
||||
defStyleAttr: Int = androidx.preference.R.attr.editTextPreferenceStyle,
|
||||
defStyleRes: Int = androidx.preference.R.style.Preference_DialogPreference_EditTextPreference
|
||||
) : EditTextPreference(context, attrs, defStyleAttr, defStyleRes), DialogFragmentProvider {
|
||||
|
||||
var defaultValue: String? = null
|
||||
|
@ -78,10 +78,10 @@ class SliderPreference(context: Context, attrs: AttributeSet? = null) : Preferen
|
||||
init {
|
||||
layoutResource = R.layout.preference_slider
|
||||
|
||||
context.withStyledAttributes(attrs, R.styleable.Slider) {
|
||||
valueFrom = getIntOrThrow(R.styleable.Slider_android_valueFrom)
|
||||
valueTo = getIntOrThrow(R.styleable.Slider_android_valueTo)
|
||||
stepSize = getFloat(R.styleable.Slider_android_stepSize, 1F)
|
||||
context.withStyledAttributes(attrs, com.google.android.material.R.styleable.Slider) {
|
||||
valueFrom = getIntOrThrow(com.google.android.material.R.styleable.Slider_android_valueFrom)
|
||||
valueTo = getIntOrThrow(com.google.android.material.R.styleable.Slider_android_valueTo)
|
||||
stepSize = getFloat(com.google.android.material.R.styleable.Slider_android_stepSize, 1F)
|
||||
}
|
||||
|
||||
context.withStyledAttributes(attrs, R.styleable.CustomPreference) {
|
||||
|
@ -40,7 +40,7 @@ class RtlCompliantActionProvider(context: Context) : ActionProviderCompat(contex
|
||||
}
|
||||
|
||||
override fun onCreateActionView(forItem: MenuItem): View {
|
||||
val actionView = ImageButton(context, null, R.attr.actionButtonStyle)
|
||||
val actionView = ImageButton(context, null, android.R.attr.actionButtonStyle)
|
||||
TooltipCompat.setTooltipText(actionView, forItem.title)
|
||||
forItem.icon?.let {
|
||||
it.isAutoMirrored = true
|
||||
|
@ -229,7 +229,7 @@ open class RobolectricTest : CollectionGetter, AndroidTest {
|
||||
Timber.e("The latest dialog has already been dismissed.")
|
||||
return null
|
||||
}
|
||||
return dialog.view.contentLayout.findViewById<TextView>(R.id.md_text_message).text.toString()
|
||||
return dialog.view.contentLayout.findViewById<TextView>(com.afollestad.materialdialogs.R.id.md_text_message).text.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ class CustomStudyDialogTest : RobolectricTest() {
|
||||
whenever(mockCollection.sched).thenReturn(mockSched)
|
||||
whenever(mockSched.newCount()).thenReturn(0)
|
||||
val factory = CustomStudyDialogFactory({ mockCollection }, mMockListener)
|
||||
val scenario = FragmentScenario.launch(CustomStudyDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(CustomStudyDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: CustomStudyDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
|
@ -58,7 +58,7 @@ class DeckPickerContextMenuAndroidTest : RobolectricTest() {
|
||||
.arguments
|
||||
|
||||
val factory = DeckPickerContextMenu.Factory { col }
|
||||
FragmentScenario.launch(DeckPickerContextMenu::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
FragmentScenario.launch(DeckPickerContextMenu::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
.use { scenario ->
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: DeckPickerContextMenu ->
|
||||
|
@ -237,7 +237,7 @@ class DeckPickerContextMenuTest : RobolectricTest() {
|
||||
val actualTitle =
|
||||
(ShadowDialog.getLatestDialog() as MaterialDialog)
|
||||
.view
|
||||
.findViewById<RtlTextView>(R.id.md_text_title)
|
||||
.findViewById<RtlTextView>(com.afollestad.materialdialogs.R.id.md_text_title)
|
||||
?.text
|
||||
Timber.d("titles = \"$actualTitle\", \"$expectedTitle\"")
|
||||
assertEquals(expectedTitle, "$actualTitle")
|
||||
@ -253,7 +253,7 @@ class DeckPickerContextMenuTest : RobolectricTest() {
|
||||
.itemView.performLongClick()
|
||||
|
||||
val dialogRecyclerView = (ShadowDialog.getLatestDialog() as MaterialDialog?)!!
|
||||
.view.findViewById<RecyclerView>(R.id.md_recyclerview_content)
|
||||
.view.findViewById<RecyclerView>(com.afollestad.materialdialogs.R.id.md_recyclerview_content)
|
||||
|
||||
dialogRecyclerView.apply {
|
||||
scrollToPosition(index)
|
||||
|
@ -56,7 +56,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -78,7 +78,7 @@ class TagsDialogTest {
|
||||
val args = TagsDialog(ParametersUtils.whatever())
|
||||
.withArguments(type, ArrayList(), allTags)
|
||||
.arguments
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -116,7 +116,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -151,7 +151,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -189,7 +189,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -244,7 +244,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -291,7 +291,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -345,7 +345,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -393,7 +393,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -434,7 +434,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -481,7 +481,7 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
@ -600,12 +600,12 @@ class TagsDialogTest {
|
||||
.arguments
|
||||
val mockListener = Mockito.mock(TagsDialogListener::class.java)
|
||||
val factory = TagsDialogFactory(mockListener)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, R.style.Theme_AppCompat, factory)
|
||||
val scenario = FragmentScenario.launch(TagsDialog::class.java, args, androidx.appcompat.R.style.Theme_AppCompat, factory)
|
||||
scenario.moveToState(Lifecycle.State.STARTED)
|
||||
scenario.onFragment { f: TagsDialog ->
|
||||
val dialog = f.dialog as MaterialDialog?
|
||||
MatcherAssert.assertThat(dialog, IsNull.notNullValue())
|
||||
val editText = f.getSearchView()!!.findViewById<EditText>(R.id.search_src_text)!!
|
||||
val editText = f.getSearchView()!!.findViewById<EditText>(androidx.appcompat.R.id.search_src_text)!!
|
||||
|
||||
editText.setText("hello ")
|
||||
Assert.assertEquals(
|
||||
|
@ -16,6 +16,10 @@ android {
|
||||
namespace 'com.ichi2.anki.api'
|
||||
compileSdkVersion 33
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
//noinspection OldTargetApi
|
||||
|
@ -10,7 +10,7 @@ buildscript {
|
||||
ext.ankidroid_backend_version = '0.1.21-anki2.1.61'
|
||||
ext.hamcrest_version = '2.2'
|
||||
ext.junit_version = '5.9.3'
|
||||
ext.coroutines_version = '1.7.1'
|
||||
ext.coroutines_version = '1.7.2'
|
||||
ext.fragments_version = "1.6.0"
|
||||
ext.espresso_version = '3.5.1'
|
||||
ext.androidx_test_version = '1.5.0'
|
||||
@ -25,7 +25,7 @@ buildscript {
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
classpath "com.github.BrantApps.gradle-amazon-app-store-publisher:amazonappstorepublisher:master-SNAPSHOT"
|
||||
|
@ -23,7 +23,4 @@ org.gradle.parallel=true
|
||||
org.gradle.caching=true
|
||||
|
||||
# Enable file system watching (should reduce disk IO and increase incremental build speed).
|
||||
org.gradle.vfs.watch=true
|
||||
|
||||
# Opt in to gradle 8 behavior, silence warning for now. Remove with AGP8+
|
||||
android.disableAutomaticComponentCreation=true
|
||||
org.gradle.vfs.watch=true
|
Loading…
Reference in New Issue
Block a user