AndroidAPS/pump/combov2/build.gradle
Carlos Rafael Giani 7d9925db47 Begin implementation of new combo plugin, called "combov2"
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
2022-11-06 00:13:43 +01:00

40 lines
1.8 KiB
Groovy

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'
apply plugin: 'com.hiya.jacoco-android'
apply from: "${project.rootDir}/core/android_dependencies.gradle"
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/test_dependencies.gradle"
apply from: "${project.rootDir}/core/jacoco_global.gradle"
dependencies {
implementation project(':core')
implementation project(':shared')
implementation project(':libraries')
implementation(project(":pump:combov2:comboctl"))
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
runtimeOnly("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinx_serialization_core_version")
}
android {
namespace 'info.nightscout.androidaps.combov2'
buildFeatures {
dataBinding true
}
}