change: Increase compileSdk and targetSdk to 34 (#150)
Associated changes: - Handle new null/non-null type signatures in overriden methods - Configure Robolectric to use SDK 33 (current highest supported version)
This commit is contained in:
parent
8fd536b77f
commit
53e7842439
|
@ -27,13 +27,13 @@ final def CUSTOM_INSTANCE = ""
|
|||
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Pachli"
|
||||
|
||||
android {
|
||||
compileSdk 33
|
||||
compileSdk 34
|
||||
namespace "app.pachli"
|
||||
defaultConfig {
|
||||
applicationId APP_ID
|
||||
namespace "app.pachli"
|
||||
minSdk 23
|
||||
targetSdk 33
|
||||
targetSdk 34
|
||||
versionCode 5
|
||||
versionName "1.2.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
|
|
@ -29,17 +29,6 @@
|
|||
file="$GRADLE_USER_HOME/caches/modules-2/files-2.1/org.pageseeder.diffx/pso-diffx/1.1.1/b655ebc87588a857a4f3d88cf98bcefa87a6105b/pso-diffx-1.1.1.jar"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="OldTargetApi"
|
||||
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
|
||||
errorLine1=" targetSdk 33"
|
||||
errorLine2=" ~~~~~~~~~~~~">
|
||||
<location
|
||||
file="build.gradle"
|
||||
line="36"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedAttribute"
|
||||
message="Attribute `appCategory` is only used in API level 26 and higher (current min is 23)"
|
||||
|
@ -95,6 +84,17 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="notification_title_summary">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="155"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ta" (Tamil) the following quantity should also be defined: `one` (e.g. "1")"
|
||||
|
@ -194,6 +194,17 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="hint_describe_for_visually_impaired">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="286"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "cs" (Czech) the following quantity should also be defined: `many` (e.g. "10.0 dne")"
|
||||
|
@ -238,6 +249,28 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="favs">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="329"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="reblogs">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="333"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "cs" (Czech) the following quantity should also be defined: `many` (e.g. "10.0 dne")"
|
||||
|
@ -260,6 +293,17 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_info_votes">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="359"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "cs" (Czech) the following quantity should also be defined: `many` (e.g. "10.0 dne")"
|
||||
|
@ -315,6 +359,61 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_info_people">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="430"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_timespan_seconds">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="458"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_timespan_minutes">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="462"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_timespan_hours">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="466"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="poll_timespan_days">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="470"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "cs" (Czech) the following quantity should also be defined: `many` (e.g. "10.0 dne")"
|
||||
|
@ -337,6 +436,17 @@
|
|||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "ca" (Catalan) the following quantity should also be defined: `many`"
|
||||
errorLine1=" <plurals name="error_upload_max_media_reached">"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="487"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingQuantity"
|
||||
message="For locale "cs" (Czech) the following quantity should also be defined: `many` (e.g. "10.0 dne")"
|
||||
|
|
|
@ -140,7 +140,8 @@ class PreferencesActivity :
|
|||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String?) {
|
||||
key ?: return
|
||||
when (key) {
|
||||
APP_THEME -> {
|
||||
val theme = sharedPreferences.getNonNullString(APP_THEME, APP_THEME_DEFAULT)
|
||||
|
|
|
@ -156,7 +156,7 @@ class ViewVideoFragment : ViewMediaFragment() {
|
|||
|
||||
/** A fling up/down should dismiss the fragment */
|
||||
override fun onFling(
|
||||
e1: MotionEvent,
|
||||
e1: MotionEvent?,
|
||||
e2: MotionEvent,
|
||||
velocityX: Float,
|
||||
velocityY: Float,
|
||||
|
|
|
@ -347,21 +347,21 @@ class ClickableSpanTextView @JvmOverloads constructor(
|
|||
return firstDiff < secondDiff
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
// Paint span boundaries. Optimised out on release builds, or debug builds where
|
||||
// showSpanBoundaries is false.
|
||||
if (BuildConfig.DEBUG && showSpanBoundaries) {
|
||||
canvas?.save()
|
||||
canvas.save()
|
||||
for (entry in delegateRects) {
|
||||
canvas?.drawRect(entry.key, paddingDebugPaint)
|
||||
canvas.drawRect(entry.key, paddingDebugPaint)
|
||||
}
|
||||
|
||||
for (entry in spanRects) {
|
||||
canvas?.drawRect(entry.key, spanDebugPaint)
|
||||
canvas.drawRect(entry.key, spanDebugPaint)
|
||||
}
|
||||
canvas?.restore()
|
||||
canvas.restore()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -265,14 +265,14 @@ class GraphView @JvmOverloads constructor(
|
|||
|
||||
private fun dataSpacing(data: List<Any>) = width.toFloat() / max(data.size - 1, 1).toFloat()
|
||||
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
|
||||
if (primaryLinePath.isEmpty && width > 0) {
|
||||
initializeVertices()
|
||||
}
|
||||
|
||||
canvas?.apply {
|
||||
canvas.apply {
|
||||
drawRect(sizeRect, graphPaint)
|
||||
|
||||
val pointDistance = dataSpacing(primaryLineData)
|
||||
|
|
|
@ -31,11 +31,9 @@ import org.junit.Before
|
|||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.annotation.Config
|
||||
import java.time.Instant
|
||||
import java.util.Date
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class FilterV1Test {
|
||||
|
||||
|
|
|
@ -8,9 +8,7 @@ import org.junit.Assert.assertEquals
|
|||
import org.junit.Assert.assertNotEquals
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class StatusComparisonTest {
|
||||
|
||||
|
|
|
@ -32,10 +32,8 @@ import org.mockito.kotlin.any
|
|||
import org.mockito.kotlin.anyOrNull
|
||||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.Response
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class NotificationsPagingSourceTest {
|
||||
@Test
|
||||
|
|
|
@ -38,11 +38,9 @@ import org.mockito.kotlin.doAnswer
|
|||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.HttpException
|
||||
import retrofit2.Response
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
abstract class NotificationsViewModelTestBase {
|
||||
protected lateinit var notificationsRepository: NotificationsRepository
|
||||
|
|
|
@ -39,12 +39,10 @@ import org.mockito.kotlin.doReturn
|
|||
import org.mockito.kotlin.doThrow
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.HttpException
|
||||
import retrofit2.Response
|
||||
import java.io.IOException
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class CachedTimelineRemoteMediatorTest {
|
||||
|
||||
|
|
|
@ -44,11 +44,9 @@ import org.mockito.kotlin.doAnswer
|
|||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.HttpException
|
||||
import retrofit2.Response
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
abstract class CachedTimelineViewModelTestBase {
|
||||
protected lateinit var cachedTimelineRepository: CachedTimelineRepository
|
||||
|
|
|
@ -28,9 +28,7 @@ import com.google.common.truth.Truth.assertThat
|
|||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class NetworkTimelinePagingSourceTest {
|
||||
@Test
|
||||
|
|
|
@ -43,11 +43,9 @@ import org.mockito.kotlin.doAnswer
|
|||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.HttpException
|
||||
import retrofit2.Response
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
abstract class NetworkTimelineViewModelTestBase {
|
||||
protected lateinit var networkTimelineRepository: NetworkTimelineRepository
|
||||
|
|
|
@ -35,10 +35,8 @@ import org.mockito.kotlin.doReturn
|
|||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.stub
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
import java.io.IOException
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ViewThreadViewModelTest {
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ import org.junit.Assert.assertEquals
|
|||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class TimelineDaoTest {
|
||||
private lateinit var timelineDao: TimelineDao
|
||||
|
|
|
@ -16,12 +16,10 @@ import org.junit.runner.RunWith
|
|||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.stub
|
||||
import org.robolectric.annotation.Config
|
||||
import retrofit2.HttpException
|
||||
import retrofit2.Response
|
||||
import java.util.Date
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class TimelineCasesTest {
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
|
|||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class HttpHeaderLinkTest {
|
||||
data class TestData(val name: String, val input: String, val want: List<HttpHeaderLink>)
|
||||
|
|
|
@ -13,9 +13,7 @@ import org.junit.Assert
|
|||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class LinkHelperTest {
|
||||
private val listener = object : LinkListener {
|
||||
|
|
|
@ -8,9 +8,7 @@ import org.junit.Assert
|
|||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.mockito.Mockito
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class LocaleUtilsTest {
|
||||
@Test
|
||||
|
|
|
@ -8,9 +8,7 @@ import org.junit.Before
|
|||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.Robolectric
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class RickRollTest {
|
||||
private lateinit var activity: Activity
|
||||
|
|
|
@ -6,9 +6,7 @@ import org.junit.Assert.assertFalse
|
|||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class SmartLengthInputFilterTest {
|
||||
|
||||
|
|
|
@ -8,11 +8,9 @@ import org.junit.Test
|
|||
import org.junit.runner.RunWith
|
||||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.mock
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
private const val STATUS_CREATED_AT_NOW = "test"
|
||||
|
||||
@Config(sdk = [28])
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class TimestampUtilsTest {
|
||||
private val ctx: Context = mock {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Copyright 2023 Pachli Association
|
||||
#
|
||||
# This file is a part of Pachli.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
# GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Pachli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with Pachli; if not,
|
||||
# see <http://www.gnu.org/licenses>.
|
||||
#
|
||||
|
||||
# Robolectric does not support SDK 34 yet
|
||||
# https://github.com/robolectric/robolectric/issues/8404
|
||||
sdk=33
|
Loading…
Reference in New Issue