gradle -> kts

This commit is contained in:
Milos Kozak 2023-10-18 17:04:02 +02:00
parent 92be75150f
commit 4ddef7a508
23 changed files with 372 additions and 343 deletions

View file

@ -5,8 +5,10 @@ object Libs {
const val kotlin = "1.9.10"
const val platformBom = "org.jetbrains.kotlin:kotlin-bom"
const val stdlibJdk8 = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin"
const val test = "org.jetbrains.kotlin:kotlin-test:$kotlin"
const val testJunit5 = "org.jetbrains.kotlin:kotlin-test-junit5"
const val reflect = "org.jetbrains.kotlin:kotlin-reflect:$kotlin"
}
@ -17,11 +19,13 @@ object Libs {
const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization"
const val serializationProtobuf = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$serialization"
const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:$serialization"
const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
const val coroutinesRx3 = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3:$coroutinesVersion"
const val coroutinesGuava = "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutinesVersion"
const val coroutinesPlayServices = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion"
const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion"
const val datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.1"
}
@ -31,11 +35,17 @@ object Libs {
const val appCompat = "androidx.appcompat:appcompat:1.6.1"
const val activity = "androidx.activity:activity-ktx:1.8.0"
const val preference = "androidx.preference:preference-ktx:1.2.1"
const val workRuntimeKtx = "androidx.work:work-runtime-ktx:2.8.1"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4"
const val swipeRefreshLayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
const val gridLayout = "androidx.gridlayout:gridlayout:1.0.0"
const val browser = "androidx.browser:browser:1.6.0"
const val lifecycleViewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
object Work {
private const val workVersion = "2.8.1"
const val runtimeKtx = "androidx.work:work-runtime-ktx:$workVersion"
const val testing = "androidx.work:work-testing:$workVersion"
}
object Test {
const val espressoCore = "androidx.test.espresso:espresso-core:3.5.1"
@ -81,6 +91,7 @@ object Libs {
}
const val material = "com.google.android.material:material:1.10.0"
const val flexbox = "com.google.android.flexbox:flexbox:3.0.0"
}
object Firebase {
@ -134,6 +145,7 @@ object Libs {
const val jupiter = "org.junit.jupiter:junit-jupiter:$junitVersion"
const val jupiterApi = "org.junit.jupiter:junit-jupiter-api:$junitVersion"
const val jupiterEngine = "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
}
object Mockito {
@ -172,8 +184,12 @@ object Libs {
const val jodaTime = "joda-time:joda-time:2.12.5"
const val json = "org.json:json:20230618"
const val jsonAssert = "org.skyscreamer:jsonassert:1.5.0"
const val rootBeer = "com.scottyab:rootbeer-lib:0.1.0"
const val javaOtp = "com.eatthepath:java-otp:0.4.0"
const val qrGen = "com.github.kenglxn.QRGen:android:3.0.1"
const val socketIo = "io.socket:socket.io-client:2.1.0"
const val kotlinTestRunner = "io.kotlintest:kotlintest-runner-junit5:3.4.2"
const val lifecycle = "2.6.2"
const val fragmentktx = "1.6.1"
const val ormLite = "4.46"
const val nav = "2.7.4"

View file

@ -45,7 +45,7 @@ dependencies {
api(Libs.Rx.rxAndroid)
// WorkerClasses
api(Libs.AndroidX.workRuntimeKtx)
api(Libs.AndroidX.Work.runtimeKtx)
// TODO eliminate kapt from low level modules
kapt(Libs.Dagger.compiler)

View file

@ -34,7 +34,7 @@ dependencies {
api(Libs.Dagger.androidSupport)
//WorkManager
api(Libs.AndroidX.workRuntimeKtx) // DataWorkerStorage
api(Libs.AndroidX.Work.runtimeKtx) // DataWorkerStorage
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)

View file

@ -32,7 +32,7 @@ dependencies {
api(Libs.Google.tinkAndroid)
//WorkManager
api(Libs.AndroidX.workRuntimeKtx) // DataWorkerStorage
api(Libs.AndroidX.Work.runtimeKtx) // DataWorkerStorage
api(Libs.Dagger.android)
api(Libs.Dagger.androidSupport)

View file

@ -1,34 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
id 'kotlin-parcelize'
}
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.configuration'
}
dependencies {
implementation project(':database:entities')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:nssdk')
implementation project(':core:utils')
implementation project(':core:ui')
implementation project(':core:validators')
testImplementation project(':shared:tests')
//WorkManager
api "androidx.work:work-runtime-ktx:$work_version"
// Maintenance
api "androidx.gridlayout:gridlayout:$gridlayout_version"
}

View file

@ -0,0 +1,35 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("kotlin-parcelize")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.configuration"
}
dependencies {
implementation(project(":database:entities"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:nssdk"))
implementation(project(":core:utils"))
implementation(project(":core:ui"))
implementation(project(":core:validators"))
testImplementation(project(":shared:tests"))
//WorkManager
api(Libs.AndroidX.Work.runtimeKtx)
// Maintenance
api(Libs.AndroidX.gridLayout)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,39 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
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/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.constraints'
}
dependencies {
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ui')
implementation project(':core:utils')
implementation project(':core:validators')
implementation project(':database:entities')
testImplementation project(':database:impl')
testImplementation project(':implementation')
testImplementation project(':insight')
testImplementation project(':plugins:aps')
testImplementation project(':plugins:source')
testImplementation project(':pump:combo')
testImplementation project(':pump:dana')
testImplementation project(':pump:danar')
testImplementation project(':pump:danars')
testImplementation project(':pump:virtual')
testImplementation project(':shared:tests')
// Phone checker
api 'com.scottyab:rootbeer-lib:0.1.0'
}

View file

@ -0,0 +1,41 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
id("all-open-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.constraints"
}
dependencies {
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
implementation(project(":core:validators"))
implementation(project(":database:entities"))
testImplementation(project(":database:impl"))
testImplementation(project(":implementation"))
testImplementation(project(":insight"))
testImplementation(project(":plugins:aps"))
testImplementation(project(":plugins:source"))
testImplementation(project(":pump:combo"))
testImplementation(project(":pump:dana"))
testImplementation(project(":pump:danar"))
testImplementation(project(":pump:danars"))
testImplementation(project(":pump:virtual"))
testImplementation(project(":shared:tests"))
// Phone checker
api(Libs.rootBeer)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,28 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.insulin'
}
dependencies {
implementation project(':core:graphview')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ui')
implementation project(':core:utils')
implementation project(':core:validators')
implementation project(':database:entities')
testImplementation project(':shared:tests')
testImplementation project(':core:main')
}

View file

@ -0,0 +1,30 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.insulin"
}
dependencies {
implementation(project(":core:graphview"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
implementation(project(":core:validators"))
implementation(project(":database:entities"))
testImplementation(project(":shared:tests"))
testImplementation(project(":core:main"))
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,47 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
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/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.main'
}
dependencies {
implementation project(':shared:impl')
implementation project(':database:entities')
implementation project(':database:impl')
implementation project(':core:graphview')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:nssdk')
implementation project(':core:ui')
implementation project(':core:utils')
implementation project(':core:validators')
testImplementation project(':implementation')
testImplementation project(':plugins:insulin')
testImplementation project(':shared:tests')
api "androidx.appcompat:appcompat:$appcompat_version"
api "com.google.android.material:material:$material_version"
// Actions
api "androidx.gridlayout:gridlayout:$gridlayout_version"
//SmsCommunicator
api 'com.eatthepath:java-otp:0.4.0'
api 'com.github.kenglxn.QRGen:android:3.0.1'
// Overview
api 'com.google.android.flexbox:flexbox:3.0.0'
// Food
api "androidx.work:work-runtime-ktx:$work_version"
}

View file

@ -0,0 +1,49 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.main"
}
dependencies {
implementation(project(":shared:impl"))
implementation(project(":database:entities"))
implementation(project(":database:impl"))
implementation(project(":core:graphview"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:nssdk"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
implementation(project(":core:validators"))
testImplementation(project(":implementation"))
testImplementation(project(":plugins:insulin"))
testImplementation(project(":shared:tests"))
api(Libs.AndroidX.appCompat)
api(Libs.Google.Android.material)
// Actions
api(Libs.AndroidX.gridLayout)
//SmsCommunicator
api(Libs.javaOtp)
api(Libs.qrGen)
// Overview
api(Libs.Google.Android.flexbox)
// Food
api(Libs.AndroidX.Work.runtimeKtx)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,27 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.sensitivity'
}
dependencies {
implementation project(':database:entities')
implementation project(':database:impl')
implementation project(':core:interfaces')
implementation project(':core:utils')
implementation project(':core:ui')
implementation project(':core:validators')
testImplementation project(':shared:tests')
}

View file

@ -0,0 +1,28 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.sensitivity"
}
dependencies {
implementation(project(":database:entities"))
implementation(project(":database:impl"))
implementation(project(":core:interfaces"))
implementation(project(":core:utils"))
implementation(project(":core:ui"))
implementation(project(":core:validators"))
testImplementation(project(":shared:tests"))
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,22 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.smoothing'
}
dependencies {
implementation project(':database:entities')
implementation project(':core:interfaces')
implementation project(':core:ui')
}

View file

@ -0,0 +1,23 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.smoothing"
}
dependencies {
implementation(project(":database:entities"))
implementation(project(":core:interfaces"))
implementation(project(":core:ui"))
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,54 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
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/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
namespace 'app.aaps.plugins.sync'
}
dependencies {
implementation project(':shared:impl')
implementation project(':database:entities')
implementation project(':database:impl')
implementation project(':core:graphview')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:nssdk')
implementation project(':core:ui')
implementation project(':core:utils')
implementation project(':core:validators')
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
testImplementation "androidx.work:work-testing:$work_version"
testImplementation project(':shared:tests')
testImplementation project(':implementation')
testImplementation project(':plugins:aps')
// OpenHuman
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
api "com.squareup.retrofit2:retrofit:$retrofit2_version"
api "androidx.browser:browser:1.6.0"
api "androidx.work:work-runtime-ktx:$work_version"
api "com.google.android.material:material:$material_version"
// NSClient, Tidepool
api("io.socket:socket.io-client:2.1.0")
api "com.squareup.okhttp3:okhttp:$okhttp3_version"
api "com.squareup.okhttp3:logging-interceptor:$okhttp3_version"
api "com.squareup.retrofit2:adapter-rxjava3:$retrofit2_version"
api "com.squareup.retrofit2:converter-gson:$retrofit2_version"
api "com.google.code.gson:gson:$gson_version"
// DataLayerListenerService
api "com.google.android.gms:play-services-wearable:$play_services_wearable_version"
}

View file

@ -0,0 +1,54 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "app.aaps.plugins.sync"
}
dependencies {
implementation(project(":shared:impl"))
implementation(project(":database:entities"))
implementation(project(":database:impl"))
implementation(project(":core:graphview"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:nssdk"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
implementation(project(":core:validators"))
testImplementation(Libs.KotlinX.coroutinesTest)
testImplementation(Libs.AndroidX.Work.testing)
testImplementation(project(":shared:tests"))
testImplementation(project(":implementation"))
testImplementation(project(":plugins:aps"))
// OpenHuman
api(Libs.Squareup.Okhttp3.okhttp)
api(Libs.Squareup.Retrofit2.retrofit)
api(Libs.AndroidX.browser)
api(Libs.AndroidX.Work.runtimeKtx)
api(Libs.Google.Android.material)
// NSClient, Tidepool
api(Libs.socketIo)
api(Libs.Squareup.Okhttp3.loggingInterceptor)
api(Libs.Squareup.Retrofit2.adapterRxJava3)
api(Libs.Squareup.Retrofit2.converterGson)
api(Libs.Google.gson)
// DataLayerListenerService
api(Libs.Google.Android.PlayServices.wearable)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,31 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
}
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
android {
buildFeatures {
aidl true
}
namespace 'info.nightscout.pump.combo'
}
dependencies {
implementation project(':core:libraries')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ui')
implementation project(':core:utils')
testImplementation project(':shared:tests')
// RuffyScripter
api "com.google.guava:guava:$guava_version"
}

View file

@ -0,0 +1,33 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
buildFeatures {
aidl = true
}
namespace = "info.nightscout.pump.combo"
}
dependencies {
implementation(project(":core:libraries"))
implementation(project(":core:interfaces"))
implementation(project(":core:main"))
implementation(project(":core:ui"))
implementation(project(":core:utils"))
testImplementation(project(":shared:tests"))
// RuffyScripter
api(Libs.Google.guava)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,30 +1,36 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-dependencies")
}
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"
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.pump.combov2"
buildFeatures {
dataBinding = true
}
}
dependencies {
implementation project(':core:libraries')
implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ui')
implementation project(':core:utils')
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"))
api "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
api "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
api(Libs.AndroidX.lifecycleViewmodel)
api(Libs.KotlinX.datetime)
// 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<
// "Rejecting re-init on(previously-failed class java.lang.Class<
// kotlinx.datetime.serializers.LocalDateTimeIso8601Serializer>:
// java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/KSerializer"
//
@ -34,12 +40,8 @@ dependencies {
//
// 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_version")
}
runtimeOnly(Libs.KotlinX.serializationCore)
android {
namespace 'info.nightscout.pump.combov2'
buildFeatures {
dataBinding true
}
}
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)
}

View file

@ -1,33 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}
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"
android {
namespace 'info.nightscout.comboctl'
sourceSets {
main {
kotlin.srcDirs += ['src/commonMain/kotlin', 'src/androidMain/kotlin']
manifest.srcFile 'src/androidMain/AndroidManifest.xml'
}
test {
kotlin.srcDirs += ['src/jvmTest/kotlin']
}
}
}
dependencies {
implementation platform("org.jetbrains.kotlin:kotlin-bom")
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"
}

View file

@ -0,0 +1,33 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("android-module-dependencies")
id("test-dependencies")
}
apply(from = "${project.rootDir}/core/main/jacoco_global.gradle")
android {
namespace = "info.nightscout.comboctl"
sourceSets.getByName("main") {
kotlin.srcDir("src/commonMain/kotlin")
kotlin.srcDir("src/androidMain/kotlin")
manifest.srcFile("src/androidMain/AndroidManifest.xml")
}
sourceSets.getByName("test") {
kotlin.srcDir("src/jvmTest/kotlin")
}
}
dependencies {
implementation(platform(Libs.Kotlin.platformBom))
testImplementation(Libs.Kotlin.test)
testImplementation(Libs.Kotlin.testJunit5)
api(Libs.KotlinX.coroutinesCore)
api(Libs.KotlinX.datetime)
api(Libs.AndroidX.core)
testImplementation(Libs.kotlinTestRunner)
testRuntimeOnly(Libs.JUnit.jupiterEngine)
}