AndroidAPS/pump/combov2/build.gradle.kts

46 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-08-27 13:55:51 +02:00
plugins {
2023-10-18 17:04:02 +02:00
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
2023-10-21 20:33:03 +02:00
id("test-module-dependencies")
2023-10-20 10:49:54 +02:00
id("jacoco-module-dependencies")
2023-08-27 13:55:51 +02:00
}
2023-10-18 17:04:02 +02:00
android {
namespace = "info.nightscout.pump.combov2"
buildFeatures {
dataBinding = true
}
}
dependencies {
2023-10-18 17:04:02 +02:00
implementation(project(":core:libraries"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
implementation(project(":pump:combov2:comboctl"))
2023-09-18 23:58:37 +02:00
2023-10-18 17:04:02 +02:00
api(Libs.AndroidX.lifecycleViewmodel)
api(Libs.KotlinX.datetime)
2023-09-18 23:58:37 +02:00
// 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"
//
2023-10-18 17:04:02 +02:00
// "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-10-18 17:04:02 +02:00
runtimeOnly(Libs.KotlinX.serializationCore)
2023-10-18 17:04:02 +02:00
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}