From f6590d0d88a0ab2728fdd92bf9d67fc8996027dd Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 8 May 2024 09:42:17 +0200 Subject: [PATCH] build: [ANDROAPP-6133] remove unused dependencies --- app/build.gradle.kts | 7 ----- app/src/main/res/layout/cat_comb_filter.xml | 20 ------------ commons/build.gradle.kts | 5 --- dhis2_android_maps/build.gradle.kts | 1 - form/build.gradle.kts | 2 -- gradle/libs.versions.toml | 35 +++++---------------- stock-usecase/build.gradle.kts | 1 - ui-components/build.gradle.kts | 1 - 8 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 app/src/main/res/layout/cat_comb_filter.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 535bb1ac95..6e516f4776 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -253,13 +253,11 @@ dependencies { implementation(libs.androidx.work) implementation(libs.androidx.workrx) implementation(libs.androidx.exifinterface) - implementation(libs.google.flexbox) implementation(libs.google.guava) implementation(libs.github.pinlock) implementation(libs.github.fancyshowcase) implementation(libs.lottie) implementation(libs.dagger.hilt.android) - implementation(libs.rx.kotlin) implementation(libs.network.gsonconverter) implementation(libs.network.okhttp) implementation(libs.dates.jodatime) @@ -276,7 +274,6 @@ dependencies { debugImplementation(libs.analytics.flipper.network) debugImplementation(libs.analytics.flipper.leak) debugImplementation(libs.analytics.leakcanary) - debugImplementation(libs.test.ui.test.manifest) releaseImplementation(libs.analytics.leakcanary.noop) releaseImplementation(libs.analytics.flipper.noop) @@ -286,7 +283,6 @@ dependencies { kapt(libs.dagger.compiler) kapt(libs.dagger.hilt.android.compiler) - kapt(libs.dagger.hilt.compiler) kapt(libs.deprecated.autoValueParcel) testImplementation(libs.test.archCoreTesting) @@ -303,12 +299,9 @@ dependencies { androidTestImplementation(libs.test.testRunner) androidTestImplementation(libs.test.espresso.intents) androidTestImplementation(libs.test.espresso.contrib) - androidTestImplementation(libs.test.espresso.accessibility) - androidTestImplementation(libs.test.espresso.web) androidTestImplementation(libs.test.uiautomator) androidTestImplementation(libs.test.testCore) androidTestImplementation(libs.test.rules) - androidTestImplementation(libs.test.coreKtx) androidTestImplementation(libs.test.junitKtx) androidTestImplementation(libs.test.mockitoCore) androidTestImplementation(libs.test.dexmaker.mockitoInline) diff --git a/app/src/main/res/layout/cat_comb_filter.xml b/app/src/main/res/layout/cat_comb_filter.xml deleted file mode 100644 index b7a62f0ae4..0000000000 --- a/app/src/main/res/layout/cat_comb_filter.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/commons/build.gradle.kts b/commons/build.gradle.kts index 20ecdd06a0..f37d81da59 100644 --- a/commons/build.gradle.kts +++ b/commons/build.gradle.kts @@ -82,14 +82,10 @@ dependencies { api(libs.androidx.coreKtx) api(libs.androidx.appcompat) api(libs.androidx.fragmentKtx) - api(libs.androidx.liveDataKtx) api(libs.androidx.viewModelKtx) - api(libs.androidx.lifecycleExtensions) api(libs.androidx.recyclerView) debugApi(libs.androidx.compose.uitooling) api(libs.androidx.compose) - api(libs.androidx.compose.constraintlayout) - api(libs.androidx.compose.preview) api(libs.androidx.compose.ui) api(libs.androidx.compose.livedata) @@ -110,7 +106,6 @@ dependencies { api(libs.barcodeScanner.zxing.android) { exclude("com.google.zxing", "core") } - api(libs.rx.binding) api(libs.rx.binding.compat) testApi(libs.test.junit) androidTestApi(libs.test.mockitoCore) diff --git a/dhis2_android_maps/build.gradle.kts b/dhis2_android_maps/build.gradle.kts index cb7aaa95aa..4ab7cb5974 100644 --- a/dhis2_android_maps/build.gradle.kts +++ b/dhis2_android_maps/build.gradle.kts @@ -65,7 +65,6 @@ dependencies { exclude("com.mapbox.mapboxsdk", "mapbox-android-sdk") } - androidTestImplementation(libs.bundles.map.androidTest) testImplementation(libs.bundles.map.test) coreLibraryDesugaring(libs.desugar) } diff --git a/form/build.gradle.kts b/form/build.gradle.kts index 5b5d511093..f3c51e624a 100644 --- a/form/build.gradle.kts +++ b/form/build.gradle.kts @@ -63,11 +63,9 @@ dependencies { implementation(project(":dhis2-mobile-program-rules")) testImplementation(libs.bundles.form.test) androidTestImplementation(libs.test.compose.ui.test) - implementation(libs.androidx.activity.compose) debugImplementation(libs.androidx.compose.uitooling) debugImplementation(libs.test.ui.test.manifest) - implementation(libs.androidx.compose.preview) coreLibraryDesugaring(libs.desugar) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a3fcea4135..0fdef41d62 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,6 @@ kotlinCompilerExtensionVersion = "1.5.6" gradle = "8.2.2" kotlin = '1.9.21' hilt = '2.47' -hiltCompiler = '1.0.0' jacoco = '0.8.10' designSystem = "0.2-20240430.062706-60" dhis2sdk = "1.10.0-20240426.151240-44" @@ -36,7 +35,6 @@ activityCompose = "1.8.2" viewModelCompose = "2.7.0" compose_ui_test = "1.5.4" material = "1.9.0" -flexbox = "3.0.0" material3 = "1.1.1" themeAdapter = "0.28.0" pinlock = "2.1.0" @@ -82,9 +80,7 @@ junit_ext = "1.1.5" espresso_core = "3.5.1" androidx_test_orchestrator = "1.4.2" androidx_test_runner = "1.5.2" -androidx_test_core = "1.5.0" androidx_test = "1.5.0" -mockito_android = "3.3.3" dexmaker-mockito-inline = "2.28.1" hamcrest = "2.2" kotlinxserialization = "1.5.1" @@ -109,10 +105,8 @@ desugar = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref androidx-activityKtx = { group = "androidx.activity", name = "activity-ktx", version.ref = "activityCompose" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } androidx-fragmentKtx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentktx" } -androidx-liveDataKtx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycle" } androidx-viewModelKtx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "viewModelCompose" } -androidx-lifecycleExtensions = { group = "androidx.lifecycle", name = "lifecycle-extensions", version.ref = "lifecycleExtensions" } androidx-recyclerView = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" } androidx-viewpager2 = { group = "androidx.viewpager2", name = "viewpager2", version.ref = "viewpager2" } androidx-compose = { group = "androidx.compose.material", name = "material", version.ref = "compose" } @@ -121,7 +115,6 @@ androidx-compose-constraintlayout = { group = "androidx.constraintlayout", name androidx-compose-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata", version.ref = "compose" } androidx-compose-uitooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "compose" } androidx-compose-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "compose" } -androidx-compose-viewbinding = { group = "androidx.compose.ui", name = "ui-viewbinding", version.ref = "compose" } androidx-coreKtx = { group = "androidx.core", name = "core-ktx", version.ref = "corektx" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } androidx-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" } @@ -130,7 +123,6 @@ androidx-legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support androidx-multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } androidx-work = { group = "androidx.work", name = "work-runtime", version.ref = "work" } -androidx-work-runtimeKtx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "work" } androidx-workrx = { group = "androidx.work", name = "work-rxjava2", version.ref = "work" } androidx-workgcm = { group = "androidx.work", name = "work-gcm", version.ref = "work" } androidx-exifinterface = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exif" } @@ -138,7 +130,6 @@ androidx-preferenceKtx = { group = "androidx.preference", name = "preference-ktx androidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" } androidx-dynamicanimation = { group = "androidx.dynamicanimation", name = "dynamicanimation", version.ref = "dynamicanimation" } kotlin-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxserialization" } -google-flexbox = { group = "com.google.android.flexbox", name = "flexbox", version.ref = "flexbox" } google-guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } google-auth = { group = "com.google.android.gms", name = "play-services-auth", version = "20.6.0" } google-auth-apiphone = { group = "com.google.android.gms", name = "play-services-auth-api-phone", version = "18.0.1" } @@ -154,9 +145,7 @@ dagger = { group = "com.google.dagger", name = "dagger", version.ref = "hilt" } dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "hilt" } dagger-hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } dagger-hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" } -dagger-hilt-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "hiltCompiler" } dagger-hilt-compiler-new = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" } -rx-kotlin = { group = "io.reactivex.rxjava2", name = "rxkotlin", version = "2.3.0" } rx-java = { group = "io.reactivex.rxjava2", name = "rxjava", version.ref = "rxjava" } rx-android = { group = "io.reactivex.rxjava2", name = "rxandroid", version.ref = "rxandroid" } rx-binding = { group = "com.jakewharton.rxbinding2", name = "rxbinding", version.ref = "rxbindings" } @@ -194,7 +183,6 @@ test-testCore = { group = "androidx.test", name = "core", version.ref = "android test-mockitoCore = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" } test-mockitoInline = { group = "org.mockito", name = "mockito-inline", version.ref = "mockito_inline" } test-mockitoKotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" } -test-mockito-android = { group = "org.mockito", name = "mockito-android", version.ref = "mockito_android" } test-dexmaker-mockitoInline = { group = "com.linkedin.dexmaker", name = "dexmaker-mockito-inline", version.ref = "dexmaker-mockito-inline" } test-truth = { group = "com.google.truth", name = "truth", version.ref = "google_truth" } test-orchestrator = { group = "androidx.test", name = "orchestrator", version.ref = "androidx_test_orchestrator" } @@ -204,16 +192,11 @@ test-espresso-idlingresource = { group = "androidx.test.espresso", name = "espre test-espresso-idlingconcurrent = { group = "androidx.test.espresso.idling", name = "idling-concurrent", version.ref = "espresso_core" } test-espresso-intents = { group = "androidx.test.espresso", name = "espresso-intents", version.ref = "espresso_core" } test-espresso-contrib = { group = "androidx.test.espresso", name = "espresso-contrib", version.ref = "espresso_core" } -test-espresso-accessibility = { group = "androidx.test.espresso", name = "espresso-accessibility", version.ref = "espresso_core" } -test-espresso-web = { group = "androidx.test.espresso", name = "espresso-web", version.ref = "espresso_core" } -test-uiautomator-v18 = { group = "com.android.support.test.uiautomator", name = "uiautomator-v18", version = "2.1.3" } test-rules = { group = "androidx.test", name = "rules", version.ref = "androidx_test" } -test-coreKtx = { group = "androidx.test", name = "core-ktx", version.ref = "androidx_test_core" } test-junitKtx = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "junit_ext" } test-junit-ext = { group = "androidx.test.ext", name = "junit", version.ref = "junit_ext" } test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiautomator" } test-support-annotations = { group = "com.android.support", name = "support-annotations", version = "28.0.0" } -test-okhttp3-idling-resource = { group = "com.jakewharton.espresso", name = "okhttp3-idling-resource", version = "1.0.0" } test-rx2-idler = { group = "com.squareup.rx.idler", name = "rx2-idler", version = "0.11.0" } test-kotlinCoroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxcoroutines" } test-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "compose_ui_test" } @@ -231,27 +214,23 @@ dispatcher-dispatchEspresso = { group = "com.rickbusarow.dispatch", name = "disp deprecated-autoValueParcel = { group = "com.ryanharter.auto.value", name = "auto-value-parcel", version.ref = "autovalueparcel" } #TODO: Remove alongside AutoValue [plugins] [bundles] -uicomponents-implementation = ["androidx-coreKtx", "androidx-appcompat", "androidx-activity-compose", "androidx-material3", "google-material", "lottie-compose", "dhis2-mobile-designsystem"] -uicomponents-api = ["dhis2-mobile-designsystem", "androidx-compose-constraintlayout", "androidx-compose-preview", "androidx-compose-ui", "androidx-compose-viewbinding", "androidx-compose-livedata", "google-material-themeadapter", "google-material3-themeadapter"] +uicomponents-implementation = ["androidx-coreKtx", "androidx-material3", "google-material", "lottie-compose", "dhis2-mobile-designsystem"] +uicomponents-api = ["dhis2-mobile-designsystem", "androidx-compose-constraintlayout", "androidx-compose-preview", "androidx-compose-ui", "google-material-themeadapter", "google-material3-themeadapter"] uicomponents-debugapi = ["androidx-compose-uitooling"] -uicomponents-test = ["test-junit"] -uicomponents-androidtest = ["test-junit-ext", "test-espresso"] +uicomponents-androidtest = ["test-junit-ext"] analytics-implementation = ["androidx-cardview", "androidx-constraintlayout"] analytics-api = ["github-charts"] analytics-kapt = ["dagger-compiler"] analytics-test = ["test-mockitoCore", "test-mockitoInline", "test-mockitoKotlin", "test-kotlinCoroutines", "test-archCoreTesting"] -form-test = ["test-mockitoCore", "test-mockitoInline", "test-mockitoKotlin", "test-turbine", "test-testCore", "test-rules", "test-archCoreTesting", "test-kotlinCoroutines"] -form-androidTest = ["test-espresso-idlingresource"] +form-test = ["test-mockitoCore", "test-mockitoInline", "test-mockitoKotlin", "test-testCore", "test-archCoreTesting", "test-kotlinCoroutines"] map-test = ["test-mockitoCore", "test-mockitoInline", "test-mockitoKotlin"] -map-androidTest = ["test-mockito-android", "test-mockitoCore"] -table-implementation = ["kotlin-serialization-json", "androidx-coreKtx", "androidx-appcompat", "androidx-activity-compose", "androidx-compose", "androidx-compose-constraintlayout", "androidx-compose-preview", "androidx-compose-ui", "androidx-compose-livedata", "google-material", "google-material-themeadapter"] +table-implementation = ["kotlin-serialization-json", "androidx-appcompat", "androidx-activity-compose", "androidx-compose", "androidx-compose-constraintlayout", "androidx-compose-preview", "androidx-compose-ui", "androidx-compose-livedata"] table-debugImplementation = ["androidx-compose-uitooling", "test-ui-test-manifest"] table-test = ["test-junit"] table-androidTest = ["test-compose-ui-test", "test-uiautomator", "test-junitKtx", "test-espresso"] -stock-implementation = ["kotlin-serialization-json", "androidx-activity-compose", "androidx-annotation", "androidx-legacy-support-v4", "androidx-constraintlayout", "rx-relay", "security-openId", "androidx-preferenceKtx", "androidx-work", "androidx-work-runtimeKtx", "androidx-workrx", "androidx-workgcm", "androidx-activityKtx", "androidx-fragmentKtx", "androidx-lifecycle-viewmodel-compose", "analytics-customactivityoncrash", "dagger-hilt-android"] +stock-implementation = ["androidx-activity-compose", "androidx-annotation", "rx-relay", "security-openId", "androidx-preferenceKtx", "androidx-work", "androidx-workgcm", "androidx-activityKtx", "androidx-lifecycle-viewmodel-compose", "analytics-customactivityoncrash", "dagger-hilt-android"] stock-core = ["desugar"] stock-kapt = ["dagger-hilt-compiler-new"] stock-debugImplementation = ["analytics-flipper", "analytics-soloader"] stock-releaseImplementation = ["analytics-flipper-noop"] -stock-test = ["test-junit", "test-mockitoKotlin", "test-mockitoInline", "test-archCoreTesting", "test-javafaker", "test-kotlinCoroutines"] -stock-androidTest = ["test-junit-ext", "test-espresso", "test-archCoreTesting"] +stock-test = ["test-mockitoKotlin", "test-mockitoInline", "test-archCoreTesting", "test-javafaker", "test-kotlinCoroutines"] diff --git a/stock-usecase/build.gradle.kts b/stock-usecase/build.gradle.kts index 3e40b426b1..40c0b68b83 100644 --- a/stock-usecase/build.gradle.kts +++ b/stock-usecase/build.gradle.kts @@ -94,7 +94,6 @@ dependencies { debugImplementation(libs.bundles.stock.debugImplementation) releaseImplementation(libs.bundles.stock.releaseImplementation) testImplementation(libs.bundles.stock.test) - androidTestImplementation(libs.bundles.stock.androidTest) debugImplementation(libs.analytics.flipper.network) { exclude("com.squareup.okhttp3") diff --git a/ui-components/build.gradle.kts b/ui-components/build.gradle.kts index ea038fcb2a..e6d8cbc3b9 100644 --- a/ui-components/build.gradle.kts +++ b/ui-components/build.gradle.kts @@ -57,6 +57,5 @@ dependencies { implementation(libs.bundles.uicomponents.implementation) api(libs.bundles.uicomponents.api) debugApi(libs.bundles.uicomponents.debugapi) - testImplementation(libs.bundles.uicomponents.test) androidTestImplementation(libs.bundles.uicomponents.androidtest) }