Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency org.robolectric:robolectric to v4.11.1 #306

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

packaging {
resources.excludes.add("META-INF/*")
}
}

koverReport {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.mslalith.focuslauncher.benchmark

import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.benchmark.macro.junit4.BaselineProfileRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import dev.mslalith.focuslauncher.benchmark.extensions.gotoAppDrawer
Expand All @@ -11,15 +12,15 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@OptIn(ExperimentalBaselineProfilesApi::class)
@RequiresApi(Build.VERSION_CODES.P)
@RunWith(AndroidJUnit4::class)
internal class BaselineProfileTest {

@get:Rule
val baselineProfileRule = BaselineProfileRule()

@Test
fun startUp() = baselineProfileRule.collectBaselineProfile(
fun startUp() = baselineProfileRule.collect(
packageName = "dev.mslalith.focuslauncher"
) {
pressHome()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package dev.mslalith.focuslauncher.core.launcherapps.providers.icons.impl

import android.content.ComponentName
import android.graphics.drawable.Drawable
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import com.google.common.truth.Truth.assertThat
import dev.mslalith.focuslauncher.core.launcherapps.manager.iconcache.IconCacheManager
import dev.mslalith.focuslauncher.core.model.IconPackType
Expand All @@ -23,13 +24,8 @@ internal class IconProviderImplTest {
private val iconCacheManager = mockk<IconCacheManager>()
private val iconProvider = IconProviderImpl(iconCacheManager = iconCacheManager)

private val drawableChrome by lazy {
Drawable.createFromPath("M11,2l2,0l0,5l8,0l0,3l-8,0l0,4l5,0l0,3l-5,0l0,5l-2,0l0,-5l-5,0l0,-3l5,0l0,-4l-8,0l0,-3l8,0z")!!
}

private val drawablePhone by lazy {
Drawable.createFromPath("M11,2l2,0l0,5l8,0l0,3l-8,0l0,4l5,0z")!!
}
private val drawableChrome by lazy { ColorDrawable(Color.GRAY) }
private val drawablePhone by lazy { ColorDrawable(Color.CYAN) }

@Test
fun `01 - when retrieving icon for same app, icons should be same`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AppRobolectricTestRunner(testClass: Class<*>?) : RobolectricTestRunner(tes

override fun buildGlobalConfig(): Config {
return Config.Builder()
.setSdk(33)
// .setSdk(33)
.build()
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ksp = "1.9.10-1.0.13"
ktorClient = "2.3.5"
mockk = "1.13.8"
osmdroid = "6.1.17"
robolectric = "4.10.3"
robolectric = "4.11.1"
room = "2.6.0"
suncalc = "3.7"
truth = "1.1.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class IconPackViewModelTest : CoroutineTest() {
@Before
fun setup() {
hiltRule.inject()
testIconPackManager.hashCode()
viewModel = IconPackViewModel(
getAllAppsOnIconPackChangeUseCase = getAllAppsOnIconPackChangeUseCase,
getIconPackIconicAppsUseCase = getIconPackIconicAppsUseCase,
Expand Down