Skip to content

Commit

Permalink
Merge pull request #101 from azrael8576/chore/cleanup-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
azrael8576 authored Jan 29, 2024
2 parents b3fdff3 + 1b63c05 commit 8f7c692
Show file tree
Hide file tree
Showing 20 changed files with 101 additions and 129 deletions.
62 changes: 29 additions & 33 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.pq.android.application.compose)
alias(libs.plugins.pq.android.application.flavors)
alias(libs.plugins.pq.android.hilt)
alias(libs.plugins.roborazzi)
}

android {
Expand Down Expand Up @@ -66,57 +67,52 @@ android {
}

dependencies {
implementation(projects.feature.contactme)
implementation(projects.feature.home)
implementation(projects.feature.photo)
implementation(projects.feature.video)
implementation(projects.feature.contactme)

implementation(projects.core.designsystem)
implementation(projects.core.common)
implementation(projects.core.data)
implementation(projects.core.model)
implementation(projects.core.datastore)
implementation(projects.core.designsystem)
implementation(projects.core.model)


androidTestImplementation(projects.core.designsystem)
androidTestImplementation(projects.core.datastoreTest)
androidTestImplementation(projects.core.testing)
androidTestImplementation(libs.androidx.navigation.testing)
androidTestImplementation(libs.accompanist.testharness)
testImplementation(projects.core.datastoreTest)
testImplementation(projects.core.testing)
testImplementation(libs.androidx.navigation.testing)
testImplementation(libs.accompanist.testharness)
debugImplementation(projects.uiTestHiltManifest)
debugImplementation(libs.androidx.compose.ui.testManifest)

kspTest(libs.hilt.compiler)

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.activity.compose)

implementation(libs.androidx.core.ktx)
// Splashscreen
implementation(libs.androidx.core.splashscreen)
// Write trace events to the system trace buffer.
implementation(libs.androidx.tracing.ktx)
// LifeCycle
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.androidx.lifecycle.runtimeCompose)

// WindowSizeClass
implementation(libs.androidx.compose.material3.windowSizeClass)
// Navigation
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.androidx.navigation.compose)

// Coroutines
implementation(libs.kotlinx.coroutines.android)

// Splashscreen
implementation(libs.androidx.core.splashscreen)

// Timber
implementation(libs.timber)

// ExoPlayer
implementation(libs.media3.exoplayer)
implementation(libs.media3.exoplayer.dash)
implementation(libs.media3.ui)

debugImplementation(projects.uiTestHiltManifest)
// LeakCanary
debugImplementation(libs.leakcanary)
debugImplementation(libs.androidx.compose.ui.testManifest)

kspTest(libs.hilt.compiler)

testImplementation(projects.core.datastoreTest)
testImplementation(projects.core.testing)
testImplementation(libs.accompanist.testharness)
testImplementation(libs.hilt.android.testing)

testDemoImplementation(libs.robolectric)
testDemoImplementation(libs.roborazzi)

androidTestImplementation(projects.core.datastoreTest)
androidTestImplementation(projects.core.testing)
androidTestImplementation(libs.accompanist.testharness)
androidTestImplementation(libs.androidx.navigation.testing)
androidTestImplementation(libs.hilt.android.testing)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("com.android.application")
// Screenshot Tests
pluginManager.apply("io.github.takahirom.roborazzi")

val extension = extensions.getByType<ApplicationExtension>()
configureAndroidCompose(extension)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.kotlin

class AndroidFeatureConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
Expand All @@ -24,28 +23,11 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
}

dependencies {
add("implementation", project(":core:network"))
add("implementation", project(":core:common"))
add("implementation", project(":core:designsystem"))
add("implementation", project(":core:data"))
add("implementation", project(":core:model"))
add("implementation", project(":core:domain"))

add("testImplementation", kotlin("test"))
add("testImplementation", project(":core:testing"))
add("androidTestImplementation", kotlin("test"))
add("androidTestImplementation", project(":core:testing"))
add("androidTestImplementation", project(":core:designsystem"))

add("implementation", libs.findLibrary("coil.kt").get())
add("implementation", libs.findLibrary("coil.kt.compose").get())
add("implementation", libs.findLibrary("coil.kt.svg").get())

add("implementation", libs.findLibrary("androidx.hilt.navigation.compose").get())
add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get())

add("implementation", libs.findLibrary("kotlinx.coroutines.android").get())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("com.android.library")
// Screenshot Tests
pluginManager.apply("io.github.takahirom.roborazzi")

val extension = extensions.getByType<LibraryExtension>()
configureAndroidCompose(extension)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
}
dependencies {
add("testImplementation", kotlin("test"))
add("testImplementation", project(":core:testing"))
add("androidTestImplementation", kotlin("test"))
add("androidTestImplementation", project(":core:testing"))

// Paging 3
add("implementation", libs.findLibrary("paging-runtime").get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ internal fun Project.configureAndroidCompose(
val bom = libs.findLibrary("androidx-compose-bom").get()
add("implementation", platform(bom))
add("androidTestImplementation", platform(bom))
// Add ComponentActivity to debug manifest
add("debugImplementation", libs.findLibrary("androidx.compose.ui.testManifest").get())
// Screenshot Tests on JVM
add("testImplementation", libs.findLibrary("robolectric").get())
add("testImplementation", libs.findLibrary("roborazzi").get())
}

testOptions {
Expand Down
9 changes: 7 additions & 2 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ android {
dependencies {
// LifeCycle
implementation(libs.androidx.lifecycle.runtimeCompose)

// Coroutines
implementation(libs.kotlinx.coroutines.android)
}

testImplementation(projects.core.testing)
// For flow test
testImplementation(libs.turbine)

androidTestImplementation(projects.core.testing)
}
1 change: 1 addition & 0 deletions core/data-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dependencies {

implementation(libs.hilt.android.testing)
}

4 changes: 1 addition & 3 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ dependencies {
api(projects.core.network)
api(projects.core.model)
api(projects.core.datastore)

implementation(libs.kotlinx.serialization.json)
}
}
9 changes: 3 additions & 6 deletions core/datastore-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ android {
}

dependencies {
api(projects.core.datastore)
implementation(projects.core.testing)
implementation(projects.core.common)
implementation(projects.core.model)

implementation(projects.core.datastore)
implementation(libs.hilt.android.testing)
// DataStore
implementation(libs.androidx.datastore)

// Protobuf
implementation(libs.protobuf.kotlin.lite)
}
}
3 changes: 1 addition & 2 deletions core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ dependencies {
api(projects.core.model)

implementation(projects.core.common)

// DataStore
implementation(libs.androidx.datastore)

// Protobuf
implementation(libs.protobuf.kotlin.lite)
}

34 changes: 16 additions & 18 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
alias(libs.plugins.pq.android.library)
alias(libs.plugins.pq.android.library.compose)
alias(libs.plugins.pq.android.hilt)
alias(libs.plugins.roborazzi)
}

android {
Expand All @@ -15,11 +16,8 @@ android {
dependencies {
androidTestImplementation(projects.core.testing)

// Write trace events to the system trace buffer.
api(libs.androidx.tracing.ktx)
// Material Design 3
api(libs.androidx.compose.material3)
api(libs.androidx.compose.material3.windowSizeClass)
api(libs.androidx.compose.material.iconsExtended)
// main APIs for the underlying toolkit systems,
// such as input and measurement/layout
Expand All @@ -29,23 +27,23 @@ dependencies {
api(libs.androidx.compose.runtime)
// Android Studio Preview support
api(libs.androidx.compose.ui.tooling.preview)
api(libs.androidx.compose.ui.tooling)
// Optional - Integration with window
api(libs.androidx.window)
// Optional - Integration with LiveData
api(libs.androidx.compose.runtime.livedata)
// Optional - accompanist adaptive
api(libs.accompanist.adaptive)

implementation(libs.androidx.core.ktx)
// Optional - Integration with activities
implementation(libs.androidx.activity.compose)
// Optional - Integration with browser
implementation(libs.androidx.browser)
// Coil
implementation(libs.coil.kt)
implementation(libs.coil.kt.compose)
implementation(libs.coil.kt.svg)
// kotlin datetime
implementation(libs.kotlinx.datetime)
}
api(libs.coil.kt.compose)
api(libs.coil.kt.svg)

debugApi(libs.androidx.compose.ui.tooling)

testImplementation(libs.androidx.compose.ui.test)
testImplementation(libs.accompanist.testharness)
testImplementation(libs.hilt.android.testing)
testImplementation(libs.robolectric)
testImplementation(libs.roborazzi)
testImplementation(projects.core.testing)

androidTestImplementation(libs.androidx.compose.ui.test)
androidTestImplementation(projects.core.testing)
}
4 changes: 3 additions & 1 deletion core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ android {
dependencies {
api(projects.core.data)
api(projects.core.model)
}

testImplementation(projects.core.testing)
}
11 changes: 6 additions & 5 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ dependencies {
api(projects.core.common)
api(projects.core.model)

// KotlinxSerializationJson
implementation(libs.kotlinx.serialization.json)
// Okhttp Interceptor
implementation(libs.okhttp.logging)

// Retrofit2
implementation(libs.retrofit.core)

// RetrofitKotlinxSerializationJson
implementation(libs.retrofit.kotlin.serialization)

// KotlinxSerializationJson
implementation(libs.kotlinx.serialization.json)
}
testImplementation(projects.core.testing)

androidTestImplementation(projects.core.testing)
}
29 changes: 11 additions & 18 deletions core/testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,26 @@ android {
namespace = "com.wei.picquest.core.testing"
}


dependencies {
api(projects.core.data)
api(projects.core.model)

api(libs.junit4)
api(libs.androidx.activity.compose)
api(kotlin("test"))
api(libs.androidx.compose.ui.test)
api(libs.androidx.test.espresso.core)
api(libs.androidx.test.core)
api(libs.androidx.test.runner)
// testharness
api(libs.accompanist.testharness)
// Coroutines test
api(libs.kotlinx.coroutines.test)
api(libs.hilt.android.testing)
// Google truth
api(libs.google.truth)
// For flow test
api(libs.turbine)
// Android Unit Testing Framework
api(libs.robolectric.shadows)
// For screenshot tests
api(libs.roborazzi)
api(projects.core.data)
api(projects.core.model)

debugApi(libs.androidx.compose.ui.testManifest)

// testharness
implementation(libs.accompanist.testharness)
implementation(libs.androidx.activity.compose)
implementation(libs.hilt.android.testing)
// Coroutines test
implementation(libs.kotlinx.coroutines.test)
// Android Unit Testing Framework
implementation(libs.robolectric.shadows)
implementation(projects.core.common)
implementation(projects.core.designsystem)
}
7 changes: 6 additions & 1 deletion feature/contactme/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ android {
}

dependencies {
}
implementation(projects.core.data)

testImplementation(projects.core.testing)

androidTestImplementation(projects.core.testing)
}
7 changes: 6 additions & 1 deletion feature/home/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ android {
}

dependencies {
}
implementation(projects.core.data)

testImplementation(projects.core.testing)

androidTestImplementation(projects.core.testing)
}
Loading

0 comments on commit 8f7c692

Please sign in to comment.