forked from mockk/mockk
/
build.gradle.kts
72 lines (57 loc) · 2.22 KB
/
build.gradle.kts
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
import io.mockk.dependencies.Deps
import io.mockk.dependencies.kotlinVersion
plugins {
id("mpp-android")
}
extra["mavenName"] = "MockK Android"
extra["mavenDescription"] = "mocking library for Kotlin (Android instrumented test)"
apply(from = "${rootProject.extensions.extraProperties["gradles"]}/upload.gradle")
android {
compileSdkVersion("android-31")
lintOptions {
isAbortOnError = false
disable("InvalidPackage")
warning("NewApi")
}
packagingOptions {
exclude("META-INF/main.kotlin_module")
exclude("META-INF/LICENSE.md")
exclude("META-INF/LICENSE-notice.md")
}
defaultConfig {
minSdk = 26
targetSdk = 32
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments
testInstrumentationRunnerArguments["notAnnotation"] = "io.mockk.test.SkipInstrumentedAndroidTest"
}
sourceSets {
getByName("androidTest").assets.srcDirs("$projectDir/common/src/test/kotlin")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
// very weird hack to make it working in IDE (check settings.gradle)
val mockKProject = findProject(":mockk-jvm")?.project ?: project(":mockk")
dependencies {
api(project(":${mockKProject.name}")) {
exclude(group = "io.mockk", module = "mockk-agent-jvm")
}
implementation(project(":mockk-agent-android"))
implementation(project(":mockk-agent-api"))
testImplementation("junit:junit:4.13.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") {
exclude(group = "com.android.support", module = "support-annotations")
}
androidTestImplementation(Deps.Libs.kotlinReflect(kotlinVersion()))
androidTestImplementation(Deps.Libs.kotlinCoroutinesCore())
androidTestImplementation(Deps.Libs.kotlinTestJunit()) {
exclude(group = "junit", module = "junit")
}
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation(Deps.Libs.junitJupiterApi)
androidTestImplementation(Deps.Libs.junitJupiterEngine)
androidTestImplementation(Deps.Libs.junitVintageEngine)
}