combov2: Integrate comboctl unit tests

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
This commit is contained in:
Carlos Rafael Giani 2022-12-04 20:34:33 +01:00
parent 69f085a83c
commit aa595fefcb
2 changed files with 10 additions and 1 deletions

View file

@ -16,6 +16,7 @@ dependencies {
implementation project(':core:utils')
implementation project(':app-wear-shared:shared')
implementation(project(":pump:combov2:comboctl"))
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version")
// This is necessary to avoid errors like these which otherwise come up often at runtime:
// "WARNING: Failed to transform class kotlinx/datetime/TimeZone$Companion

View file

@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
android {
namespace 'info.nightscout.comboctl'
@ -10,6 +11,9 @@ android {
kotlin.srcDirs += ['src/commonMain/kotlin', 'src/androidMain/kotlin']
manifest.srcFile 'src/androidMain/AndroidManifest.xml'
}
test {
kotlin.srcDirs += ['src/jvmTest/kotlin']
}
}
}
@ -18,4 +22,8 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
implementation "androidx.core:core-ktx:$core_version"
}
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
}