AndroidAPS/buildSrc/src/main/kotlin/test-module-dependencies.gradle.kts

54 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-10-14 23:24:34 +02:00
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("com.android.library")
id("kotlin-android")
}
dependencies {
2023-10-20 10:49:54 +02:00
testImplementation(kotlin("test"))
2023-10-14 23:24:34 +02:00
testImplementation(Libs.JUnit.jupiter)
testImplementation(Libs.JUnit.jupiterApi)
testImplementation(Libs.json)
testImplementation(Libs.Mockito.jupiter)
testImplementation(Libs.Mockito.kotlin)
2023-10-18 15:14:14 +02:00
testImplementation(Libs.jodaTime)
2023-10-14 23:24:34 +02:00
testImplementation(Libs.Google.truth)
testImplementation(Libs.jsonAssert)
androidTestImplementation(Libs.AndroidX.Test.espressoCore)
androidTestImplementation(Libs.AndroidX.Test.extKtx)
androidTestImplementation(Libs.AndroidX.Test.rules)
//androidTestImplementation(Libs.AndroidX.Test.uiAutomator)
}
tasks.withType<Test> {
// use to display stdout in travis
testLogging {
// set options for log level LIFECYCLE
events = setOf(
TestLogEvent.FAILED,
TestLogEvent.STARTED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
)
exceptionFormat = TestExceptionFormat.FULL
useJUnitPlatform()
}
}
tasks.withType<Test>().configureEach {
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
forkEvery = 20
}
android {
testOptions {
unitTests {
isReturnDefaultValues = true
isIncludeAndroidResources = true
}
}
}