diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index d11d242eb2..29a4f92449 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -40,12 +40,16 @@ object Libs { 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" + const val fragment = "androidx.fragment:fragment-ktx:1.6.1" + const val navigationFragment = "androidx.navigation:navigation-fragment-ktx:2.7.4" object Work { - private const val workVersion = "2.8.1" + + 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" @@ -72,6 +76,7 @@ object Libs { } const val biometric = "androidx.biometric:biometric:1.1.0" + const val media3 = "androidx.media3:media3-common:1.1.1" } object Google { @@ -189,8 +194,9 @@ object Libs { 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 rxandroidBle = "com.polidea.rxandroidble3:rxandroidble:1.17.2" + const val rx3ReplayingShare = "com.jakewharton.rx3:replaying-share:3.0.0" - const val fragmentktx = "1.6.1" const val ormLite = "4.46" const val nav = "2.7.4" const val commonscodec = "1.16.0" @@ -203,9 +209,6 @@ object Libs { const val androidx_junit = "1.1.5" const val androidx_rules = "1.5.0" - const val rxandroidble = "1.12.1" - const val replayshare = "2.2.0" - const val kotlinx_datetime = "0.4.1" const val kotlinx_serialization = "1.6.0" diff --git a/pump/dana/build.gradle b/pump/dana/build.gradle deleted file mode 100644 index 9f985c5304..0000000000 --- a/pump/dana/build.gradle +++ /dev/null @@ -1,40 +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 'info.nightscout.pump.dana' - defaultConfig { - kapt { - arguments { - arg("room.incremental", "true") - arg("room.schemaLocation", "$projectDir/schemas") - } - } - } -} - -dependencies { - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:ui') - implementation project(':core:utils') - - 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" - - testImplementation project(':shared:tests') - testImplementation project(':core:main') // create profile from json -} \ No newline at end of file diff --git a/pump/dana/build.gradle.kts b/pump/dana/build.gradle.kts new file mode 100644 index 0000000000..b30ba3fcec --- /dev/null +++ b/pump/dana/build.gradle.kts @@ -0,0 +1,41 @@ +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 = "info.nightscout.pump.dana" + defaultConfig { + kapt { + arguments { + arg("room.incremental", "true") + arg("room.schemaLocation", "$projectDir/schemas") + } + } + } +} + +dependencies { + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:ui")) + implementation(project(":core:utils")) + + api(Libs.AndroidX.Room.room) + api(Libs.AndroidX.Room.runtime) + api(Libs.AndroidX.Room.rxJava3) + kapt(Libs.AndroidX.Room.compiler) + + testImplementation(project(":shared:tests")) + testImplementation(project(":core:main")) // create profile from json + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file diff --git a/pump/danar/build.gradle b/pump/danar/build.gradle deleted file mode 100644 index 04b0b7415d..0000000000 --- a/pump/danar/build.gradle +++ /dev/null @@ -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 'info.nightscout.androidaps.danar' -} - -dependencies { - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:utils') - implementation project(':core:ui') - implementation project(':core:validators') - implementation project(':pump:dana') - - api 'androidx.media3:media3-common:1.1.1' - - testImplementation project(':shared:tests') - testImplementation project(':core:main') -} \ No newline at end of file diff --git a/pump/danar/build.gradle.kts b/pump/danar/build.gradle.kts new file mode 100644 index 0000000000..1bc5d9dbc5 --- /dev/null +++ b/pump/danar/build.gradle.kts @@ -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 = "info.nightscout.androidaps.danar" +} + +dependencies { + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:utils")) + implementation(project(":core:ui")) + implementation(project(":core:validators")) + implementation(project(":pump:dana")) + + api(Libs.AndroidX.media3) + + testImplementation(project(":shared:tests")) + testImplementation(project(":core:main")) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file diff --git a/pump/danars/build.gradle b/pump/danars/build.gradle deleted file mode 100644 index 472aa0545c..0000000000 --- a/pump/danars/build.gradle +++ /dev/null @@ -1,41 +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 { - ndkVersion "21.1.6352462" - namespace 'info.nightscout.pump.danars' - - defaultConfig { - - ndk { - moduleName "BleCommandUtil" - } - } - - sourceSets { - main { - jniLibs.srcDirs = ['src/main/jniLibs'] - } - } -} - -dependencies { - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:utils') - implementation project(':core:ui') - implementation project(':core:validators') - implementation project(':pump:dana') - - testImplementation project(':shared:tests') - testImplementation project(':core:main') -} \ No newline at end of file diff --git a/pump/danars/build.gradle.kts b/pump/danars/build.gradle.kts new file mode 100644 index 0000000000..360b7b6036 --- /dev/null +++ b/pump/danars/build.gradle.kts @@ -0,0 +1,39 @@ +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 = "info.nightscout.pump.danars" + ndkVersion = Versions.ndkVersion + + defaultConfig { + ndk { + moduleName = "BleCommandUtil" + } + } + + sourceSets.getByName("main") { + jniLibs.srcDirs("src/main/jniLibs") + } +} + +dependencies { + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:utils")) + implementation(project(":core:ui")) + implementation(project(":core:validators")) + implementation(project(":pump:dana")) + + testImplementation(project(":shared:tests")) + testImplementation(project(":core:main")) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file diff --git a/pump/diaconn/build.gradle b/pump/diaconn/build.gradle deleted file mode 100644 index c49e08945e..0000000000 --- a/pump/diaconn/build.gradle +++ /dev/null @@ -1,42 +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 'info.nightscout.pump.diaconn' - defaultConfig { - kapt { - arguments { - arg("room.incremental", "true") - arg("room.schemaLocation", "$projectDir/schemas") - } - } - } -} - -dependencies { - implementation project(':shared:impl') - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:utils') - implementation project(':core:ui') - - 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.squareup.okhttp3:okhttp:$okhttp3_version" - api "com.squareup.retrofit2:retrofit:$retrofit2_version" - api "com.squareup.retrofit2:converter-gson:$retrofit2_version" -} \ No newline at end of file diff --git a/pump/diaconn/build.gradle.kts b/pump/diaconn/build.gradle.kts new file mode 100644 index 0000000000..396afb8e30 --- /dev/null +++ b/pump/diaconn/build.gradle.kts @@ -0,0 +1,43 @@ +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 = "info.nightscout.pump.diaconn" + defaultConfig { + kapt { + arguments { + arg("room.incremental", "true") + arg("room.schemaLocation", "$projectDir/schemas") + } + } + } +} + +dependencies { + implementation(project(":shared:impl")) + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:utils")) + implementation(project(":core:ui")) + + api(Libs.AndroidX.Room.room) + api(Libs.AndroidX.Room.runtime) + api(Libs.AndroidX.Room.rxJava3) + kapt(Libs.AndroidX.Room.compiler) + + api(Libs.Squareup.Okhttp3.okhttp) + api(Libs.Squareup.Retrofit2.retrofit) + api(Libs.Squareup.Retrofit2.converterGson) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file diff --git a/pump/eopatch-core/build.gradle b/pump/eopatch-core/build.gradle deleted file mode 100644 index 37621a5a2b..0000000000 --- a/pump/eopatch-core/build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -configurations.create("default") -artifacts.add("default", file('libs/eopatch_core.aar')) \ No newline at end of file diff --git a/pump/eopatch-core/build.gradle.kts b/pump/eopatch-core/build.gradle.kts new file mode 100644 index 0000000000..9ab3aa190d --- /dev/null +++ b/pump/eopatch-core/build.gradle.kts @@ -0,0 +1,2 @@ +configurations.create("default") +artifacts.add("default", file("libs/eopatch_core.aar")) \ No newline at end of file diff --git a/pump/eopatch/build.gradle b/pump/eopatch/build.gradle deleted file mode 100644 index 6c35f41c74..0000000000 --- a/pump/eopatch/build.gradle +++ /dev/null @@ -1,34 +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/jacoco_global.gradle" - -android { - namespace 'info.nightscout.androidaps.plugins.pump.eopatch' - dataBinding { - enabled = true - } -} - -dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation project(':pump:eopatch-core') - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:utils') - implementation project(':core:ui') - implementation project(':database:entities') - - api "com.google.guava:guava:$guava_version" - - //RxAndroidBle - implementation "com.polidea.rxandroidble3:rxandroidble:1.17.2" - implementation "com.jakewharton.rx3:replaying-share:3.0.0" -} \ No newline at end of file diff --git a/pump/eopatch/build.gradle.kts b/pump/eopatch/build.gradle.kts new file mode 100644 index 0000000000..159d00f8d1 --- /dev/null +++ b/pump/eopatch/build.gradle.kts @@ -0,0 +1,35 @@ +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 = "info.nightscout.androidaps.plugins.pump.eopatch" + buildFeatures { + dataBinding = true + } +} + +dependencies { + implementation(project(":pump:eopatch-core")) + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:utils")) + implementation(project(":core:ui")) + implementation(project(":database:entities")) + + api(Libs.Google.guava) + + //RxAndroidBle + api(Libs.rxandroidBle) + api(Libs.rx3ReplayingShare) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file diff --git a/pump/medtronic/build.gradle b/pump/medtronic/build.gradle deleted file mode 100644 index fc3de1bb8c..0000000000 --- a/pump/medtronic/build.gradle +++ /dev/null @@ -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 'info.nightscout.androidaps.plugins.pump.medtronic' -} - -dependencies { - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:ui') - implementation project(':core:utils') - implementation project(':core:validators') - implementation project(':pump:pump-common') - implementation project(':pump:rileylink') - - testImplementation project(':shared:tests') - testImplementation project(':database:impl') -} diff --git a/pump/medtronic/build.gradle.kts b/pump/medtronic/build.gradle.kts new file mode 100644 index 0000000000..11c5ba4c10 --- /dev/null +++ b/pump/medtronic/build.gradle.kts @@ -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 = "info.nightscout.androidaps.plugins.pump.medtronic" +} + +dependencies { + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:ui")) + implementation(project(":core:utils")) + implementation(project(":core:validators")) + implementation(project(":pump:pump-common")) + implementation(project(":pump:rileylink")) + + testImplementation(project(":shared:tests")) + testImplementation(project(":database:impl")) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} diff --git a/pump/medtrum/build.gradle b/pump/medtrum/build.gradle deleted file mode 100644 index afb4c23eb0..0000000000 --- a/pump/medtrum/build.gradle +++ /dev/null @@ -1,32 +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 'info.nightscout.pump.medtrum' - dataBinding { - enabled = true - } -} - -dependencies { - implementation project(':database:entities') - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:main') - implementation project(':core:ui') - implementation project(':core:utils') - implementation project(':core:validators') - implementation project(':pump:pump-common') - - testImplementation project(':shared:tests') - testImplementation project(':core:main') -} diff --git a/pump/medtrum/build.gradle.kts b/pump/medtrum/build.gradle.kts new file mode 100644 index 0000000000..c55212ca05 --- /dev/null +++ b/pump/medtrum/build.gradle.kts @@ -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 { + namespace = "info.nightscout.pump.medtrum" + buildFeatures { + dataBinding = true + } +} + +dependencies { + implementation(project(":database:entities")) + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:main")) + implementation(project(":core:ui")) + implementation(project(":core:utils")) + implementation(project(":core:validators")) + implementation(project(":pump:pump-common")) + + testImplementation(project(":shared:tests")) + testImplementation(project(":core:main")) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} diff --git a/pump/omnipod-common/build.gradle b/pump/omnipod-common/build.gradle deleted file mode 100644 index 3acdc8943a..0000000000 --- a/pump/omnipod-common/build.gradle +++ /dev/null @@ -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 'info.nightscout.androidaps.plugins.pump.omnipod.common' -} - -dependencies { - implementation project(':core:libraries') - implementation project(':core:interfaces') - implementation project(':core:ui') - implementation project(':core:utils') - - api "androidx.constraintlayout:constraintlayout:$constraintlayout_version" - api "androidx.fragment:fragment-ktx:$fragmentktx_version" - api "androidx.navigation:navigation-fragment-ktx:$nav_version" - - api "com.google.android.material:material:$material_version" -} \ No newline at end of file diff --git a/pump/omnipod-common/build.gradle.kts b/pump/omnipod-common/build.gradle.kts new file mode 100644 index 0000000000..b08a13e331 --- /dev/null +++ b/pump/omnipod-common/build.gradle.kts @@ -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 = "info.nightscout.androidaps.plugins.pump.omnipod.common" +} + +dependencies { + implementation(project(":core:libraries")) + implementation(project(":core:interfaces")) + implementation(project(":core:ui")) + implementation(project(":core:utils")) + + api(Libs.AndroidX.constraintLayout) + api(Libs.AndroidX.fragment) + api(Libs.AndroidX.navigationFragment) + api(Libs.Google.Android.material) + + kapt(Libs.Dagger.compiler) + kapt(Libs.Dagger.androidProcessor) +} \ No newline at end of file