Skip to content

Commit

Permalink
Added dependency-guard checks for app's debugAndroidTest classpath so…
Browse files Browse the repository at this point in the history
… we can see the differences in future changes
  • Loading branch information
handstandsam committed Oct 31, 2024
1 parent 7b78b61 commit 89cc1ee
Show file tree
Hide file tree
Showing 4 changed files with 553 additions and 87 deletions.
178 changes: 91 additions & 87 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,111 +1,115 @@
plugins {
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.dependency.guard)
alias(libs.plugins.compose.compiler)
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.dependency.guard)
alias(libs.plugins.compose.compiler)
}

android {
compileSdk = Integer.parseInt(libs.versions.android.compile.sdk.get())

namespace = "com.handstandsam.shoppingapp"

defaultConfig {
applicationId = "com.handstandsam.shoppingapp"
minSdk = Integer.parseInt(libs.versions.android.min.sdk.get())
targetSdk = Integer.parseInt(libs.versions.android.target.sdk.get())
versionCode = 1
versionName = "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
compileSdk = Integer.parseInt(libs.versions.android.compile.sdk.get())

namespace = "com.handstandsam.shoppingapp"

defaultConfig {
applicationId = "com.handstandsam.shoppingapp"
minSdk = Integer.parseInt(libs.versions.android.min.sdk.get())
targetSdk = Integer.parseInt(libs.versions.android.target.sdk.get())
versionCode = 1
versionName = "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
animationsDisabled = true
}

androidComponents {
beforeVariants { variantBuilder ->
if (variantBuilder.buildType != "debug") {
variantBuilder.enable = false
}
}
}

testOptions {
animationsDisabled = true
}
lint {
baseline = file("lint-baseline.xml")
}

androidComponents {
beforeVariants { variantBuilder ->
if (variantBuilder.buildType != "debug") {
variantBuilder.enable = false
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

lint {
baseline = file("lint-baseline.xml")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
buildFeatures {
compose = true
}

buildFeatures {
compose = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}

dependencies {
implementation(project(":compose-ui"))
implementation(project(":compose-ui"))

implementation(project(":models"))
implementation(project(":mock-data"))
implementation(project(":shopping-cart"))
implementation(project(":models"))
implementation(project(":mock-data"))
implementation(project(":shopping-cart"))

// AndroidX Libraries
implementation(libs.androidx.appcompat.v7)
implementation(libs.androidx.material)
implementation(libs.androidx.lifecycle.runtime.ktx)
// AndroidX Libraries
implementation(libs.androidx.appcompat.v7)
implementation(libs.androidx.material)
implementation(libs.androidx.lifecycle.runtime.ktx)

// Networking)
implementation(libs.glide)
implementation(libs.okhttp)
implementation(project(":networking"))
debugImplementation(libs.okhttp.logging.interceptor)
// Networking)
implementation(libs.glide)
implementation(libs.okhttp)
implementation(project(":networking"))
debugImplementation(libs.okhttp.logging.interceptor)

// Kotlin)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlin.coroutines.android)
// Kotlin)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlin.coroutines.android)

//Flavor Modules)
implementation(project(":app-flavor-inmemory"))
//Flavor Modules)
implementation(project(":app-flavor-inmemory"))
// implementation( project(":app-flavor-mockserver"))
// implementation( project(":app-flavor-liveserver"))

//Logging
implementation(libs.timber)

// Compose
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.material3)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.activity.compose)
implementation(libs.accompanist.coil)
implementation(libs.coil.compose)
implementation(libs.landscapist.coil)
implementation(libs.androidx.lifecycle.runtime.ktx)

//JVM Tests Only
testImplementation(libs.junit)

androidTestImplementation(libs.androidx.espresso)
androidTestImplementation(libs.androidx.espresso.contrib)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.testrunner)
androidTestImplementation(project(":app-test-suite"))
//Logging
implementation(libs.timber)

// Compose
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.material3)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.activity.compose)
implementation(libs.accompanist.coil)
implementation(libs.coil.compose)
implementation(libs.landscapist.coil)
implementation(libs.androidx.lifecycle.runtime.ktx)

//JVM Tests Only
testImplementation(libs.junit)

androidTestImplementation(libs.androidx.espresso)
androidTestImplementation(libs.androidx.espresso.contrib)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.testrunner)
androidTestImplementation(project(":app-test-suite"))
}

dependencyGuard {
configuration("debugRuntimeClasspath") {
modules = true
}
configuration("debugRuntimeClasspath") {
modules = true
}
configuration("debugAndroidTestRuntimeClasspath") {
modules = true
tree = true
}
}
Loading

0 comments on commit 89cc1ee

Please sign in to comment.