-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestAndroid.kt
More file actions
33 lines (28 loc) Β· 1.03 KB
/
TestAndroid.kt
File metadata and controls
33 lines (28 loc) Β· 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.yapp.convention
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
internal fun Project.configureTestAndroid() {
configureJUnitAndroid()
// feature λͺ¨λμλ§ UI ν
μ€νΈ κ΄λ ¨ μ€μ μ μ©
if (path.startsWith(":feature:")) {
configureComposeUiTest()
}
}
internal fun Project.configureComposeUiTest() {
val libs = extensions.libs
dependencies {
"androidTestImplementation"(libs.findLibrary("compose-ui-test-junit4").get())
"debugImplementation"(libs.findLibrary("compose-ui-test-manifest").get())
}
}
@Suppress("UnstableApiUsage")
internal fun Project.configureJUnitAndroid() {
androidExtension.apply {
defaultConfig { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }
val libs = extensions.libs
dependencies {
"androidTestImplementation"(libs.findLibrary("androidx-test-ext-junit").get())
"androidTestImplementation"(libs.findLibrary("androidx-test-runner").get())
}
}
}