diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 16a91d6d..7659db15 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -6,9 +6,6 @@ */ @file:Suppress("UnstableApiUsage") -import com.android.build.api.dsl.ApplicationExtension -import dev.msfjarvis.claw.gradle.addTestDependencies - plugins { id("dev.msfjarvis.claw.android-application") id("dev.msfjarvis.claw.rename-artifacts") @@ -18,19 +15,16 @@ plugins { id("dev.msfjarvis.claw.versioning-plugin") id("kotlin-parcelize") alias(libs.plugins.aboutlibraries) - alias(libs.plugins.android.junit5) alias(libs.plugins.anvil) alias(libs.plugins.modulegraphassert) alias(libs.plugins.whetstone) alias(libs.plugins.licensee) - alias(libs.plugins.tracelog) alias(libs.plugins.kotlin.composeCompiler) alias(libs.plugins.kotlin.serialization) alias(libs.plugins.dependencyAnalysis) } -// Directly using the generated `android` accessor lights up bright red -extensions.configure { +android { namespace = "dev.msfjarvis.claw.android" defaultConfig.applicationId = "dev.msfjarvis.claw.android" defaultConfig.testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -93,7 +87,6 @@ dependencies { implementation(libs.androidx.compose.runtime) implementation(libs.androidx.compose.ui) implementation(libs.androidx.compose.ui.text) - implementation(libs.androidx.compose.ui.util) implementation(libs.androidx.core.splashscreen) implementation(libs.androidx.lifecycle.compose) implementation(libs.androidx.material3.navigation3) @@ -105,7 +98,6 @@ dependencies { implementation(libs.dagger) implementation(libs.eithernet) implementation(libs.haze) - implementation(libs.haze.materials) implementation(libs.javax.inject) implementation(libs.kotlinx.collections.immutable) implementation(libs.kotlinx.coroutines.core) @@ -127,8 +119,4 @@ dependencies { implementation(projects.web) kapt(libs.dagger.compiler) - - addTestDependencies(project) - androidTestImplementation(libs.androidx.test.uiautomator) - androidTestImplementation(libs.leakcanary.android.test) } diff --git a/android/src/androidTest/kotlin/dev/msfjarvis/claw/android/HeapGrowthCheck.kt b/android/src/androidTest/kotlin/dev/msfjarvis/claw/android/HeapGrowthCheck.kt deleted file mode 100644 index 115316c5..00000000 --- a/android/src/androidTest/kotlin/dev/msfjarvis/claw/android/HeapGrowthCheck.kt +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright © Harsh Shandilya. - * Use of this source code is governed by an MIT-style - * license that can be found in the LICENSE file or at - * https://opensource.org/licenses/MIT. - */ -package dev.msfjarvis.claw.android - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.uiautomator.By -import androidx.test.uiautomator.BySelector -import androidx.test.uiautomator.UiDevice -import androidx.test.uiautomator.UiObject2 -import androidx.test.uiautomator.Until -import com.google.common.truth.Truth.assertThat -import de.mannodermaus.junit5.ActivityScenarioExtension -import leakcanary.repeatingAndroidInProcessScenario -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.RegisterExtension -import shark.HeapDiff - -class HeapGrowthCheck { - @JvmField - @RegisterExtension - @Suppress("Unused") - val scenarioExtension = ActivityScenarioExtension.launch() - private val detector = HeapDiff.repeatingAndroidInProcessScenario() - private lateinit var device: UiDevice - - @BeforeEach - fun setUp() { - val instrumentation = InstrumentationRegistry.getInstrumentation() - device = UiDevice.getInstance(instrumentation) - } - - @Test - fun verify_heap_growth() { - val heapGrowth = detector.findRepeatedlyGrowingObjects { device.exploreScreens() } - assertThat(heapGrowth.growingObjects).isEmpty() - } - - private companion object { - fun UiDevice.exploreScreens() { - listOf("HOTTEST", "NEWEST", "SAVED").forEach { tag -> - waitForObject(By.res(tag)).click() - waitForIdle() - } - } - - private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 10_000L): UiObject2 { - if (wait(Until.hasObject(selector), timeout)) { - return findObject(selector) - } - - error("Object with selector [$selector] not found") - } - } -} diff --git a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt index 9445a624..713b3607 100644 --- a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt +++ b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/SentryPlugin.kt @@ -71,10 +71,6 @@ class SentryPlugin : Plugin { telemetry.set(false) telemetryDsn.set(null) } - with(project.dependencies) { - addProvider("implementation", platform(libs.sentry.bom)) - addProvider("implementation", libs.sentry.android) - } } } diff --git a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/deps.ext.kt b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/deps.ext.kt index 8d855dda..4e2e17da 100644 --- a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/deps.ext.kt +++ b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/deps.ext.kt @@ -16,12 +16,11 @@ import org.gradle.kotlin.dsl.exclude /** Extension function to configure JUnit5 dependencies with the Truth assertion library. */ fun DependencyHandlerScope.addTestDependencies(project: Project) { val libs = project.extensions.getByName("libs") as LibrariesForLibs - arrayOf("test", "androidTest", "screenshotTest") + arrayOf("test", "screenshotTest") .filter { sourceSet -> project.configurations.findByName("${sourceSet}Implementation") != null } .forEach { sourceSet -> addProvider("${sourceSet}Implementation", platform(libs.junit.bom)) addProvider("${sourceSet}Implementation", libs.junit.jupiter.api) - addProviderConvertible("${sourceSet}Implementation", libs.junit.jupiter) addProvider( "${sourceSet}Implementation", libs.truth, diff --git a/common/build.gradle.kts b/common/build.gradle.kts index a797b1f1..a59f0b6d 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -47,14 +47,10 @@ dependencies { implementation(libs.androidx.compose.material.icons.extended) implementation(libs.androidx.compose.material3) implementation(libs.androidx.compose.runtime) - implementation(libs.androidx.compose.runtime.saveable) implementation(libs.androidx.compose.ui.text) implementation(libs.androidx.core) implementation(libs.coil3.compose) implementation(libs.coil3.network.okhttp) - implementation(libs.compose.richtext.markdown) - implementation(libs.compose.richtext.material3) - implementation(libs.compose.richtext.ui) implementation(libs.htmlconverter) implementation(libs.kotlinx.collections.immutable) implementation(libs.kotlinx.coroutines.core) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f1fb13b2..d64d562a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,6 @@ [versions] aboutLibraries = "12.2.4" agp = "8.12.0" -android-junit5 = "1.13.1.0" coil3 = "3.3.0" coroutines = "1.10.2" dagger = "2.57" @@ -13,12 +12,10 @@ junit = "5.13.4" konvert = "4.1.2" kotlin = "2.2.0" kotlinResult = "2.1.0" -leakcanary = "3.0-alpha-8" lifecycle = "2.9.2" navigation3 = "1.0.0-alpha06" navigation3-material = "1.0.0-SNAPSHOT" retrofit = "3.0.0" -richtext = "1.0.0-alpha03" sentry-sdk = "8.18.0" serialization = "1.9.0" sqldelight = "2.1.0" @@ -39,13 +36,11 @@ androidx-compose-material-icons-extended = { module = "androidx.compose.material androidx-compose-material3 = { module = "androidx.compose.material3:material3" } androidx-compose-material3-window-size = { module = "androidx.compose.material3:material3-window-size-class" } androidx-compose-runtime = { module = "androidx.compose.runtime:runtime" } -androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable" } androidx-compose-ui = { module = "androidx.compose.ui:ui" } androidx-compose-ui-text = { module = "androidx.compose.ui:ui-text" } androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } androidx-compose-ui-unit = { module = "androidx.compose.ui:ui-unit" } -androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" } androidx-core = "androidx.core:core:1.16.0" androidx-core-splashscreen = "androidx.core:core-splashscreen:1.2.0-rc01" androidx-datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "datastore" } @@ -56,7 +51,6 @@ androidx-navigation3-runtime = { module = "androidx.navigation3:navigation3-runt androidx-navigation3-ui = { module = "androidx.navigation3:navigation3-ui", version.ref = "navigation3" } androidx-paging-compose = "androidx.paging:paging-compose:3.3.6" androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.1" -androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.4.0-alpha05" androidx-work-runtime = { module = "androidx.work:work-runtime", version.ref = "workmanager" } build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" } build-cachefix = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin:3.0.1" @@ -67,27 +61,21 @@ build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:7.2.1" build-vcu = "nl.littlerobots.version-catalog-update:nl.littlerobots.version-catalog-update.gradle.plugin:1.0.0" coil3-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil3" } coil3-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil3" } -compose-richtext-markdown = { module = "com.halilibo.compose-richtext:richtext-commonmark", version.ref = "richtext" } -compose-richtext-material3 = { module = "com.halilibo.compose-richtext:richtext-ui-material3", version.ref = "richtext" } -compose-richtext-ui = { module = "com.halilibo.compose-richtext:richtext-ui", version.ref = "richtext" } dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" } dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" } eithernet = { module = "com.slack.eithernet:eithernet", version.ref = "eithernet" } eithernet-integration-retrofit = { module = "com.slack.eithernet:eithernet-integration-retrofit", version.ref = "eithernet" } eithernet-test-fixtures = { module = "com.slack.eithernet:eithernet-test-fixtures", version.ref = "eithernet" } haze = { module = "dev.chrisbanes.haze:haze", version.ref = "haze" } -haze-materials = { module = "dev.chrisbanes.haze:haze-materials", version.ref = "haze" } htmlconverter = "be.digitalia.compose.htmlconverter:htmlconverter:1.1.0" javax-inject = "javax.inject:javax.inject:1" jsoup = "org.jsoup:jsoup:1.21.1" junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } -junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" } junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api" } junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine" } junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" } junit-legacy = "junit:junit:4.13.2" konvert-annotations = { module = "io.mcarle:konvert-annotations", version.ref = "konvert" } -konvert-api = { module = "io.mcarle:konvert-api", version.ref = "konvert" } konvert-processor = { module = "io.mcarle:konvert", version.ref = "konvert" } kotlinResult = { module = "com.michael-bull.kotlin-result:kotlin-result", version.ref = "kotlinResult" } kotlinResult-coroutines = { module = "com.michael-bull.kotlin-result:kotlin-result-coroutines", version.ref = "kotlinResult" } @@ -96,14 +84,12 @@ kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-c kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } -leakcanary-android-test = { module = "com.squareup.leakcanary:leakcanary-android-test", version.ref = "leakcanary" } napier = "io.github.aakira:napier:2.7.1" okhttp-bom = "com.squareup.okhttp3:okhttp-bom:5.1.0" okhttp-core = { module = "com.squareup.okhttp3:okhttp" } okhttp-loggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor" } retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } retrofit-kotlinxSerializationConverter = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" } -sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentry-sdk" } sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry-sdk" } slack-compose-lints = "com.slack.lint.compose:compose-lint-checks:1.4.2" slack-lints = "com.slack.lint:slack-lint-checks:0.11.0" @@ -119,7 +105,6 @@ unfurl = "me.saket.unfurl:unfurl:2.2.0" [plugins] aboutlibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" } -android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" } android-lint = { id = "com.android.lint", version.ref = "agp" } anvil = "com.squareup.anvil:2.6.1" dependencyAnalysis = "com.autonomousapps.dependency-analysis:2.19.0" @@ -131,5 +116,4 @@ licensee = "app.cash.licensee:1.13.0" modulegraphassert = "com.jraska.module.graph.assertion:2.9.0" poko = "dev.drewhamilton.poko:0.19.3" sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } -tracelog = "dev.msfjarvis.tracelog:0.1.3" whetstone = { id = "dev.msfjarvis.whetstone", version.ref = "whetstone" } diff --git a/model/build.gradle.kts b/model/build.gradle.kts index 702dba72..5a8a47c4 100644 --- a/model/build.gradle.kts +++ b/model/build.gradle.kts @@ -15,7 +15,6 @@ plugins { dependencies { compileOnly(libs.konvert.annotations) api(projects.database.core) - implementation(libs.konvert.api) implementation(libs.kotlinx.serialization.core) ksp(libs.konvert.processor)