Skip to content

Commit

Permalink
Merge pull request #14 from OzcanAlasalvar/featureTesting
Browse files Browse the repository at this point in the history
Feature testing
  • Loading branch information
ozcanalasalvar authored Oct 2, 2023
2 parents 405668f + df7db18 commit 5cb9b82
Show file tree
Hide file tree
Showing 83 changed files with 2,360 additions and 546 deletions.
231 changes: 231 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/kotlinScripting.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "com.ozcanalasalvar.testing.WeatherTestRunner"
vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -41,6 +41,12 @@ android {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}
}

testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
}

dependencies {
Expand All @@ -50,6 +56,7 @@ dependencies {

implementation(project(":core:designsystem"))
implementation(project(":core:model"))
implementation(project(":core:testing"))

implementation(libs.accompanist.permissions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
}
extensions.configure<LibraryExtension> {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "com.ozcanalasalvar.testing.WeatherTestRunner"
}
}

Expand All @@ -35,13 +35,13 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
add("androidTestImplementation", kotlin("test"))
add("androidTestImplementation", project(":core:testing"))

"implementation"(libs.findDependency("hilt-android").get())
"implementation"(libs.findLibrary("hilt-android").get())

"implementation"(libs.findDependency("hilt-navigation-compose").get())
"implementation"(libs.findDependency("androidx.lifecycle.runtimeCompose").get())
"implementation"(libs.findDependency("androidx.compose.lifecycle.viewmodel").get())
"implementation"(libs.findLibrary("hilt-navigation-compose").get())
"implementation"(libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
"implementation"(libs.findLibrary("androidx.compose.lifecycle.viewmodel").get())

"implementation"(libs.findDependency("kotlinx.coroutines.android").get())
"implementation"(libs.findLibrary("kotlinx.coroutines.android").get())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class AndroidHiltConventionPlugin : Plugin<Project> {

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
"implementation"(libs.findDependency("hilt-android").get())
"implementation"(libs.findDependency("hilt-navigation-compose").get())
"kapt"(libs.findDependency("hilt-android-compiler").get())
"implementation"(libs.findLibrary("hilt-android").get())
"implementation"(libs.findLibrary("hilt-navigation-compose").get())
"kapt"(libs.findLibrary("hilt-android-compiler").get())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
extensions.configure<LibraryExtension> {
configureAndroidCompose(this)
}

// val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
// configurations.configureEach {
// resolutionStrategy {
// force(libs.findDependency("junit4").get())
// // Temporary workaround for https://issuetracker.google.com/174733673
// }
// }
// dependencies {
// add("androidTestImplementation", kotlin("test"))
// add("testImplementation", kotlin("test"))
// }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
configurations.configureEach {
resolutionStrategy {
force(libs.findDependency("junit4").get())
force(libs.findLibrary("junit4").get())
// Temporary workaround for https://issuetracker.google.com/174733673
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class AndroidRoomConventionPlugin: Plugin<Project> {

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
dependencies {
"implementation"(libs.findDependency("room-ktx").get())
"implementation"(libs.findDependency("room-runtime").get())
"kapt"(libs.findDependency("room-compiler").get())
"implementation"(libs.findLibrary("room-ktx").get())
"implementation"(libs.findLibrary("room-runtime").get())
"kapt"(libs.findLibrary("room-compiler").get())
}
}
}
Expand Down
Loading

0 comments on commit 5cb9b82

Please sign in to comment.