-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
101 lines (81 loc) · 2.56 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
101 lines (81 loc) · 2.56 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.library")
kotlin("android")
id("explicit-api-mode")
id("de.mannodermaus.android-junit5").version(Artifacts.Plugin.latestStableVersion)
id("org.jetbrains.kotlin.plugin.compose")
}
val javaVersion = JavaVersion.VERSION_11
android {
namespace = "de.mannodermaus.junit5.compose"
compileSdk = Android.compileSdkVersion
defaultConfig {
minSdk = Android.testComposeMinSdkVersion
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["runnerBuilder"] = "de.mannodermaus.junit5.AndroidJUnit5Builder"
}
buildFeatures {
compose = true
buildConfig = false
resValues = false
}
compileOptions {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
testOptions {
unitTests.isReturnDefaultValues = true
targetSdk = Android.targetSdkVersion
}
lint {
targetSdk = Android.targetSdkVersion
}
packaging {
resources.excludes.add("META-INF/AL2.0")
resources.excludes.add("META-INF/LGPL2.1")
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(javaVersion.toString())
}
}
junitPlatform {
// Using local dependency instead of Maven coordinates
instrumentationTests.enabled = false
}
tasks.withType<Test> {
failFast = true
testLogging {
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
exceptionFormat = TestExceptionFormat.FULL
}
}
dependencies {
implementation(project(":core"))
implementation(libs.kotlinStdLib)
implementation(libs.kotlinCoroutinesCore)
implementation(libs.junitJupiterApi)
implementation(libs.junit4)
implementation(libs.espressoCore)
implementation(libs.composeActivity)
implementation(libs.composeUi)
implementation(libs.composeUiTooling)
implementation(libs.composeFoundation)
implementation(libs.composeMaterial)
api(libs.composeUiTest)
api(libs.composeUiTestJUnit4)
implementation(libs.composeUiTestManifest)
testImplementation(libs.junitJupiterApi)
testImplementation(libs.junitJupiterParams)
testRuntimeOnly(libs.junitJupiterEngine)
androidTestImplementation(libs.junitJupiterApi)
androidTestImplementation(libs.junitJupiterParams)
androidTestImplementation(libs.espressoCore)
androidTestRuntimeOnly(project(":runner"))
androidTestRuntimeOnly(libs.androidXTestRunner)
}
project.configureDeployment(Artifacts.Instrumentation.Compose)