Skip to content

Commit

Permalink
Remove unused dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mr3y-the-programmer committed Oct 11, 2023
1 parent 505124c commit 854fc0b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 199 deletions.
111 changes: 7 additions & 104 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ plugins {
kotlin("android")
id("org.jetbrains.compose")
alias(libs.plugins.kotlin.ksp)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.gradle.buildconfig.plugin)
alias(libs.plugins.protobuf)
alias(libs.plugins.ktlint.plugin)
alias(libs.plugins.spotless.plugin)
alias(libs.plugins.firebase.crashlytics)
Expand Down Expand Up @@ -131,128 +128,34 @@ spotless {
lineEndings = LineEnding.PLATFORM_NATIVE // or any other except GIT_ATTRIBUTES
}

buildConfig {
packageName("com.mr3y.ludi")
val key = if (System.getenv("CI").toBoolean()) {
System.getenv("RAWG_API_KEY")
} else {
val properties = Properties()
properties.load(FileInputStream(rootProject.file("local.properties")))
properties.getProperty("RAWG_API_KEY")
}
buildConfigField("String", "RAWG_API_KEY", "\"$key\"")
}

protobuf {
protoc {
artifact = libs.protobuf.protoc.get().toString()
}

// Generates the java Protobuf-lite code for the Protobufs in this project. See
// https://github.com/google/protobuf-gradle-plugin#customizing-protobuf-compilation
// for more information.
generateProtoTasks {
all().forEach { task ->
task.builtins {
val java by registering {
option("lite")
}
val kotlin by registering {
option("lite")
}
}
}
}
}

dependencies {
// Core Android dependencies
implementation(libs.androidx.core.ktx)
implementation(libs.views.material)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.activity.compose)
implementation(libs.splash.screen)

// kotlin-inject Dependency Injection
implementation(libs.kotlin.inject.runtime)
ksp(libs.kotlin.inject.ksp)

implementation(project(":shared"))

// Logging
implementation(libs.kermit)

// Crashlytics
implementation(platform(libs.firebase.bom))
val excludeAndroidxDataStore = Action<ExternalModuleDependency> {
// Crashlytics depend on datastore v1.0 but we're using v1.1
exclude(group = "androidx.datastore", module = "datastore-preferences")
}
implementation(libs.firebase.crashlytics, excludeAndroidxDataStore)
implementation(libs.firebase.analytics)

// Leak Canary
debugImplementation(libs.leakcanary)

// Datastore
implementation(libs.datastore)
implementation(libs.datastore.preferences)
implementation(libs.protobuf.kotlinlite)

// Network
implementation(libs.rss.parser)
implementation(libs.ktor.core)
implementation(libs.ktor.okhttp)
implementation(libs.ktor.content.negotation)
implementation(libs.ktor.kotlinx.serialization)
implementation(libs.kotlinx.serialization)

// Arch Components
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.voyager.navigator)
implementation(libs.voyager.transitions)

// Compose
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.coil)
implementation(compose.ui)
implementation(compose.preview)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(libs.accompanist.system.ui.controller)
implementation(libs.fornewid.placeholder)
implementation(libs.compose.richeditor)
// Palette
implementation(libs.kmpalette.core)
// Chrome custom tabs
implementation(libs.androidx.browser)
// Caching In-memory data
implementation(libs.cache4k)

// Tooling
debugImplementation(libs.androidx.compose.ui.tooling)
// Instrumented tests
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
debugImplementation(compose.uiTooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)

// Local tests: jUnit, coroutines, Android runner
testImplementation(libs.junit)
testImplementation(libs.strikt)
testImplementation(libs.turbine)
testImplementation(libs.robolectric)
testImplementation(libs.androidx.test.core)
testImplementation(libs.androidx.compose.ui.test.junit4)
testImplementation(libs.test.parameter.injector)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.ktor.client.mock)

// Instrumented tests: jUnit rules and runners

androidTestImplementation(libs.androidx.test.core)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.strikt)
androidTestImplementation(libs.turbine)
androidTestImplementation(libs.kotlinx.coroutines.test)
}
20 changes: 0 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ kotlin-multiplatform = "org.jetbrains.kotlin.multiplatform:_"
compose-multiplatform = "org.jetbrains.compose:_"
kotlin-ksp = "com.google.devtools.ksp:_"
kotlinx-serialization = "org.jetbrains.kotlin.plugin.serialization:_"
protobuf = "com.google.protobuf:_"
wire = "com.squareup.wire:4.9.1"
ktlint-plugin = "org.jlleitschuh.gradle.ktlint:_"
spotless-plugin = "com.diffplug.spotless:_"
Expand All @@ -24,19 +23,10 @@ app-versioning = "io.github.reactivecircus.app-versioning:_"

androidx-core-ktx = "androidx.core:core-ktx:_"
androidx-activity-compose = "androidx.activity:activity-compose:_"
androidx-compose-compiler = "androidx.compose.compiler:compiler:_"
androidx-compose-material = "androidx.compose.material:material:_"
androidx-compose-material3 = "androidx.compose.material3:material3:_"
androidx-compose-foundation = "androidx.compose.foundation:foundation:_"
androidx-compose-ui = "androidx.compose.ui:ui:_"
androidx-compose-material-icons-extended = "androidx.compose.material:material-icons-extended:_"
androidx-compose-ui-tooling-preview = "androidx.compose.ui:ui-tooling-preview:_"
androidx-compose-ui-test-junit4 = "androidx.compose.ui:ui-test-junit4:_"
androidx-compose-ui-tooling = "androidx.compose.ui:ui-tooling:_"
androidx-compose-ui-test-manifest = "androidx.compose.ui:ui-test-manifest:_"
androidx-browser = "androidx.browser:browser:_"
kmpalette-core = "com.kmpalette:kmpalette-core:_"
cache4k = "io.github.reactivecircus.cache4k:cache4k:_"
views-material = "com.google.android.material:material:_"
splash-screen = "androidx.core:core-splashscreen:_"
accompanist-system-ui-controller = "com.google.accompanist:accompanist-systemuicontroller:_"
Expand All @@ -51,7 +41,6 @@ firebase-bom = "com.google.firebase:firebase-bom:_"
firebase-crashlytics = "com.google.firebase:firebase-crashlytics-ktx:_"
firebase-analytics = "com.google.firebase:firebase-analytics-ktx:_"
bugsnag = "com.bugsnag:bugsnag:_"
androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:_"
androidx-lifecycle-runtime-ktx = "androidx.lifecycle:lifecycle-runtime-ktx:_"
androidx-lifecycle-runtime-compose = "androidx.lifecycle:lifecycle-runtime-compose:_"
voyager-navigator = "cafe.adriel.voyager:voyager-navigator:_"
Expand All @@ -64,15 +53,6 @@ datastore-core = "androidx.datastore:datastore-core:_"
datastore-preferences = "androidx.datastore:datastore-preferences:_"
datastore-preferences-core = "androidx.datastore:datastore-preferences-core:_"
okio = "com.squareup.okio:okio:_"
protobuf-kotlinlite = "com.google.protobuf:protobuf-kotlin-lite:3.24.0"
## ⬆ :3.24.1"
## ⬆ :3.24.2"
protobuf-protoc = "com.google.protobuf:protoc:3.24.0"
## ⬆ :3.24.1"
## ⬆ :3.24.2"
## ⬆ :4.0.0-rc-1"
## ⬆ :4.0.0-rc-2"
## ⬆ :21.0-rc-1"
kotlin-inject-ksp = "me.tatarka.inject:kotlin-inject-compiler-ksp:_"
kotlin-inject-runtime = "me.tatarka.inject:kotlin-inject-runtime:_"
lyricist-core = "cafe.adriel.lyricist:lyricist:_"
Expand Down
86 changes: 11 additions & 75 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ version.androidx.annotation=1.7.0

version.androidx.browser=1.6.0

version.androidx.compose.compiler=1.5.3

version.androidx.compose.ui=1.5.3
## # available=1.6.0-alpha01
## # available=1.6.0-alpha02
## # available=1.6.0-alpha03
## # available=1.6.0-alpha04
## # available=1.6.0-alpha05
## # available=1.6.0-alpha06
## # available=1.6.0-alpha07

version.cafe.adriel.lyricist..lyricist=1.4.2

version.cafe.adriel.lyricist..lyricist-processor=1.4.2
Expand All @@ -21,19 +32,6 @@ version.cafe.adriel.voyager..voyager-transitions=1.0.0-rc07

version.com.bugsnag..bugsnag=3.7.0

## unused
version.com.google.protobuf..protobuf-kotlin-lite=3.22.4
## # available=3.23.0-RC2
## # available=3.23.0-RC3

## unused
version.com.google.protobuf..protoc=3.22.4
## # available=3.23.0-RC2
## # available=3.23.0-RC3
## # available=4.0.0-rc-1
## # available=4.0.0-rc-2
## # available=21.0-rc-1

version.com.google.testparameterinjector..test-parameter-injector=1.12

version.com.kmpalette..kmpalette-core=1.0.1
Expand Down Expand Up @@ -66,8 +64,6 @@ version.io.github.fornewid..placeholder-material3=1.0.1

version.io.github.qdsfdhvh..image-loader=1.6.7

version.io.github.reactivecircus.cache4k..cache4k=0.11.0

version.ktor=2.3.4

version.leakcanary=2.12
Expand All @@ -93,8 +89,6 @@ version.kermit=2.0.0-RC4

version.junit.junit=4.13.2

version.google.dagger=2.48

version.google.accompanist=0.32.0
## # available=0.33.0-alpha
## # available=0.33.1-alpha
Expand All @@ -105,30 +99,10 @@ version.com.pinterest.ktlint=0.47.1
## unused
version.com.google.testparameterinjector.test-parameter-injector=1.11

## unused
version.com.google.protobuf.protoc=3.22.4
## # available=3.22.3
## # available=3.22.4
## # available=3.23.0-RC2
## # available=3.23.0-RC3
## # available=4.0.0-rc-1
## # available=4.0.0-rc-2
## # available=21.0-rc-1

## unused
version.com.google.protobuf.protobuf-kotlin-lite=3.22.4
## # available=3.22.3
## # available=3.22.4
## # available=3.23.0-RC2
## # available=3.23.0-RC3

version.coil-kt=2.4.0

version.app.cash.turbine=1.0.0

## unused
version.io.github.reactivecircus.cache4k=0.11.0

version.androidx.test.runner=1.5.2
## # available=1.5.3-alpha01
## # available=1.6.0-alpha01
Expand All @@ -143,10 +117,6 @@ version.androidx.test.ext.junit=1.1.5
version.androidx.test.core=1.5.0
## # available=1.6.0-alpha01

version.androidx.lifecycle-viewmodel-compose=2.6.2
## # available=2.7.0-alpha01
## # available=2.7.0-alpha02

version.androidx.lifecycle=2.6.2
## # available=2.7.0-alpha01
## # available=2.7.0-alpha02
Expand All @@ -159,38 +129,6 @@ version.androidx.core-splashscreen=1.0.1

version.androidx.core=1.12.0

version.androidx.compose.ui=1.5.1
## # available=1.6.0-alpha01
## # available=1.6.0-alpha02
## # available=1.6.0-alpha03
## # available=1.6.0-alpha04
## # available=1.6.0-alpha05

version.androidx.compose.material3=1.1.1
## # available=1.2.0-alpha01
## # available=1.2.0-alpha02
## # available=1.2.0-alpha03
## # available=1.2.0-alpha04
## # available=1.2.0-alpha05
## # available=1.2.0-alpha06
## # available=1.2.0-alpha07

version.androidx.compose.material=1.5.1
## # available=1.6.0-alpha01
## # available=1.6.0-alpha02
## # available=1.6.0-alpha03
## # available=1.6.0-alpha04
## # available=1.6.0-alpha05

version.androidx.compose.foundation=1.5.1
## # available=1.6.0-alpha01
## # available=1.6.0-alpha02
## # available=1.6.0-alpha03
## # available=1.6.0-alpha04
## # available=1.6.0-alpha05

version.androidx.compose.compiler=1.5.3

version.androidx.activity=1.7.2
## # available=1.8.0-alpha01
## # available=1.8.0-alpha02
Expand All @@ -203,8 +141,6 @@ version.androidx.activity=1.7.2

plugin.org.jlleitschuh.gradle.ktlint=11.5.1

plugin.com.google.protobuf=0.9.4

plugin.com.google.devtools.ksp=1.9.10-1.0.13

plugin.com.google.gms.google-services=4.3.15
Expand Down

0 comments on commit 854fc0b

Please sign in to comment.