plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-allopen'
    id 'com.hiya.jacoco-android'
    id "io.gitlab.arturbosch.detekt" // TODO move to `subprojects` section in global build.gradle
    id "org.jlleitschuh.gradle.ktlint" // TODO move to `subprojects` section in global build.gradle
}

apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"

detekt { // TODO move to `subprojects` section in global build.gradle
    toolVersion = "1.15.0-RC2"
    config = files("./detekt-config.yml")  // TODO move to global space and use "../detekt-config.yml"
}

android {

    namespace 'info.nightscout.androidaps.plugins.pump.omnipod.dash'
    defaultConfig {
        kapt {
            arguments {
                arg("room.incremental", "true")
                arg("room.schemaLocation", "$projectDir/schemas")
            }
        }
    }
}

dependencies {
    implementation project(':database:entities')
    implementation project(':database:impl')
    implementation project(':app-wear-shared:rx')
    implementation project(':app-wear-shared:shared')
    implementation project(':libraries')
    implementation project(':core:core-main')
    implementation project(':core:fabric')
    implementation project(':pump:pump-common')
    implementation project(':pump:omnipod-common')
    implementation project(':interfaces')

    api "androidx.room:room-ktx:$room_version"
    api "androidx.room:room-runtime:$room_version"
    api "androidx.room:room-rxjava3:$room_version"
    kapt "androidx.room:room-compiler:$room_version"

    api 'com.github.guepardoapps:kulid:2.0.0.0'
}