Skip to content

Commit

Permalink
Add Compose UI Test setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluu committed Dec 26, 2024
1 parent d25ff46 commit c0dd24e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ internal fun Project.configureAndroidCompose(
}

dependencies {
val bom = libs.findLibrary("androidX-compose-bom").get()
// Disabling to work with Alpha
api(platform(libs.findLibrary("androidX-compose-bom").get()))
api(platform(bom))
implementation(libs.findBundle("androidX-compose"))
debugImplementation(libs.findBundle("androidX-compose-debug"))

"androidTestImplementation"(platform(bom))
"androidTestImplementation"(libs.findBundle("androidX-compose-ui-test").get())
}

tasks.withType<KotlinCompile>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal fun Project.configureAndroid() {
minSdk = Const.minSdk
targetSdk = Const.targetSdk

testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
resourceConfigurations.addAll(listOf("en", "ko"))
}
Expand Down
7 changes: 7 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ androidX-compose-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidX-compose-toolingPreview = { module = "androidx.compose.ui:ui-tooling-preview" }
androidX-compose-ui = { module = "androidx.compose.ui:ui" }
androidX-compose-uiTestManifest = { module = "androidx.compose.ui:ui-test-manifest" }
androidX-compose-ui-test = { module = "androidx.compose.ui:ui-test" }
androidX-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
androidX-constraintlayout-compose = "androidx.constraintlayout:constraintlayout-compose:1.1.0"
androidX-fragment-ktx = "androidx.fragment:fragment-ktx:1.8.5"
androidX-hilt-navigation-compose = "androidx.hilt:hilt-navigation-compose:1.2.0"
Expand Down Expand Up @@ -100,6 +102,11 @@ androidX-compose-debug = [
"androidX-compose-uiTestManifest"
]

androidX-compose-ui-test = [
"androidX-compose-ui-test",
"androidX-compose-ui-test-junit4"
]

[plugins]
android-application = { id = "com.android.application", version.ref = "androidStudioGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidStudioGradlePlugin" }
Expand Down
1 change: 1 addition & 0 deletions repositories.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ fun configureSharedRepositories(handler: RepositoryHandler) {
handler.google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google\\.android\\..*")
includeGroupByRegex("androidx.*")
includeGroup("android.arch.lifecycle")
includeGroup("android.arch.core")
Expand Down

0 comments on commit c0dd24e

Please # to comment.