2022-02-23 17:58:08 +01:00
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
apply plugin: 'kotlin-allopen'
|
|
|
|
|
2022-12-02 10:56:11 +01:00
|
|
|
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
|
|
|
|
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
|
|
|
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
|
|
|
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
|
2022-02-23 17:58:08 +01:00
|
|
|
|
|
|
|
dependencies {
|
2022-11-25 22:14:46 +01:00
|
|
|
implementation project(':core:libraries')
|
|
|
|
implementation project(':core:interfaces')
|
2022-11-21 19:35:47 +01:00
|
|
|
implementation project(':core:ui')
|
2022-11-22 22:13:37 +01:00
|
|
|
implementation project(':core:utils')
|
2022-11-21 19:35:47 +01:00
|
|
|
implementation project(':app-wear-shared:shared')
|
2022-02-23 17:58:08 +01:00
|
|
|
implementation(project(":pump:combov2:comboctl"))
|
2022-12-04 20:34:33 +01:00
|
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
|
2022-02-23 17:58:08 +01:00
|
|
|
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
|
|
|
|
// java.lang.NoClassDefFoundError: kotlinx/serialization/KSerializer"
|
|
|
|
//
|
|
|
|
// "Rejecting re-init on previously-failed class java.lang.Class<
|
|
|
|
// kotlinx.datetime.serializers.LocalDateTimeIso8601Serializer>:
|
|
|
|
// java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/KSerializer"
|
|
|
|
//
|
|
|
|
// kotlinx-datetime higher than 0.2.0 depends on kotlinx-serialization, but that dependency
|
|
|
|
// is declared as "compileOnly". The runtime dependency on kotlinx-serialization is missing,
|
|
|
|
// causing this error. Solution is to add runtimeOnly here.
|
|
|
|
//
|
|
|
|
// Source: https://github.com/mockk/mockk/issues/685#issuecomment-907076353:
|
|
|
|
// TODO: Revisit this when upgrading kotlinx-datetime
|
2023-02-27 15:57:27 +01:00
|
|
|
runtimeOnly("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinx_serialization_version")
|
2022-02-23 17:58:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2022-11-25 15:08:02 +01:00
|
|
|
namespace 'info.nightscout.pump.combov2'
|
2022-02-23 17:58:08 +01:00
|
|
|
buildFeatures {
|
|
|
|
dataBinding true
|
|
|
|
}
|
|
|
|
}
|