interfaces module

This commit is contained in:
Milos Kozak 2022-11-06 17:48:42 +01:00
parent 4643b12414
commit 6b298a0344
31 changed files with 88 additions and 23 deletions

View file

@ -182,6 +182,7 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':app-wear-shared:shared-impl') implementation project(':app-wear-shared:shared-impl')
implementation project(':core') implementation project(':core')
implementation project(':interfaces')
implementation project(':ui') implementation project(':ui')
implementation project(':plugins') implementation project(':plugins')
implementation project(':implementation') implementation project(':implementation')

View file

@ -15,7 +15,7 @@ import info.nightscout.androidaps.interfaces.AndroidPermission
import info.nightscout.androidaps.interfaces.Autotune import info.nightscout.androidaps.interfaces.Autotune
import info.nightscout.androidaps.interfaces.BolusTimer import info.nightscout.androidaps.interfaces.BolusTimer
import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.BuildHelper
import info.nightscout.androidaps.interfaces.CarbTimer import info.nightscout.interfaces.CarbTimer
import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.CommandQueue
import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.interfaces.ConfigBuilder import info.nightscout.androidaps.interfaces.ConfigBuilder

View file

@ -20,7 +20,7 @@ import info.nightscout.androidaps.extensions.lowValueToUnitsToString
import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.ActivityNames
import info.nightscout.androidaps.interfaces.BolusTimer import info.nightscout.androidaps.interfaces.BolusTimer
import info.nightscout.androidaps.interfaces.CarbTimer import info.nightscout.interfaces.CarbTimer
import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.CommandQueue
import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint

View file

@ -18,4 +18,5 @@ dependencies {
implementation project(':database') implementation project(':database')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
} }

View file

@ -16,6 +16,7 @@ dependencies {
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database') implementation project(':database')
implementation project(':interfaces')
} }
android { android {

View file

@ -1,21 +1,2 @@
package info.nightscout.androidaps.interfaces package info.nightscout.androidaps.interfaces
interface CarbTimer {
/**
* Generate reminder via [info.nightscout.androidaps.utils.TimerUtil]
*
* @param seconds seconds to the future
*/
fun scheduleTimeToEatReminder(seconds: Int)
/**
* Create new Automation event to alarm when is time to eat
*/
fun scheduleAutomationEventEatReminder()
/**
* Remove Automation event
*/
fun removeAutomationEventEatReminder()
}

View file

@ -18,4 +18,5 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database') implementation project(':database')
implementation project(':automation') implementation project(':automation')
implementation project(':interfaces')
} }

View file

@ -1,7 +1,7 @@
package info.nightscout.implementation package info.nightscout.implementation
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.CarbTimer import info.nightscout.interfaces.CarbTimer
import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.GlucoseUnit
import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.utils.TimerUtil import info.nightscout.androidaps.utils.TimerUtil

View file

@ -25,6 +25,7 @@ android {
dependencies { dependencies {
implementation project(':core') implementation project(':core')
implementation project(':interfaces')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')

1
interfaces/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

17
interfaces/build.gradle Normal file
View file

@ -0,0 +1,17 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'kotlinx-serialization'
apply from: "${project.rootDir}/core/android_dependencies.gradle"
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
android {
namespace 'info.nightscout.interfaces'
}
dependencies {
}

View file

21
interfaces/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View file

@ -0,0 +1,21 @@
package info.nightscout.interfaces
interface CarbTimer {
/**
* Generate reminder via [info.nightscout.androidaps.utils.TimerUtil]
*
* @param seconds seconds to the future
*/
fun scheduleTimeToEatReminder(seconds: Int)
/**
* Create new Automation event to alarm when is time to eat
*/
fun scheduleAutomationEventEatReminder()
/**
* Remove Automation event
*/
fun removeAutomationEventEatReminder()
}

View file

@ -18,4 +18,5 @@ dependencies {
implementation project(':database') implementation project(':database')
implementation project(':graphview') implementation project(':graphview')
implementation project(':core') implementation project(':core')
implementation project(':interfaces')
} }

View file

@ -17,4 +17,5 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
} }

View file

@ -27,6 +27,7 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
api "androidx.room:room-ktx:$room_version" api "androidx.room:room-ktx:$room_version"
api "androidx.room:room-runtime:$room_version" api "androidx.room:room-runtime:$room_version"

View file

@ -17,4 +17,5 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':core') implementation project(':core')
implementation project(':pump:dana') implementation project(':pump:dana')
implementation project(':interfaces')
} }

View file

@ -26,4 +26,5 @@ dependencies {
implementation project(':pump:dana') implementation project(':pump:dana')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
} }

View file

@ -27,6 +27,7 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
api "androidx.room:room-ktx:$room_version" api "androidx.room:room-ktx:$room_version"
api "androidx.room:room-runtime:$room_version" api "androidx.room:room-runtime:$room_version"

View file

@ -24,6 +24,7 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database') implementation project(':database')
implementation project(':core') implementation project(':core')
implementation project(':interfaces')
//RxAndroidBle //RxAndroidBle
implementation "com.polidea.rxandroidble3:rxandroidble:1.16.0" implementation "com.polidea.rxandroidble3:rxandroidble:1.16.0"

View file

@ -19,4 +19,5 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:rileylink') implementation project(':pump:rileylink')
implementation project(':interfaces')
} }

View file

@ -18,4 +18,5 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
} }

View file

@ -37,6 +37,7 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:omnipod-common') implementation project(':pump:omnipod-common')
implementation project(':interfaces')
api "androidx.room:room-ktx:$room_version" api "androidx.room:room-ktx:$room_version"
api "androidx.room:room-runtime:$room_version" api "androidx.room:room-runtime:$room_version"

View file

@ -31,6 +31,7 @@ dependencies {
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:rileylink') implementation project(':pump:rileylink')
implementation project(':pump:omnipod-common') implementation project(':pump:omnipod-common')
implementation project(':interfaces')
api "androidx.room:room-ktx:$room_version" api "androidx.room:room-ktx:$room_version"
api "androidx.room:room-runtime:$room_version" api "androidx.room:room-runtime:$room_version"

View file

@ -16,6 +16,7 @@ dependencies {
implementation project(':core') implementation project(':core')
implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:rx')
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':interfaces')
implementation('com.thoughtworks.xstream:xstream:1.4.19') { implementation('com.thoughtworks.xstream:xstream:1.4.19') {
exclude group: 'xmlpull', module: 'xmlpull' exclude group: 'xmlpull', module: 'xmlpull'

View file

@ -17,4 +17,5 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':interfaces')
} }

View file

@ -26,3 +26,4 @@ include ':pump:pump-common'
include ':pump:rileylink' include ':pump:rileylink'
include ':openhumans' include ':openhumans'
include ':automation' include ':automation'
include ':interfaces'

View file

@ -19,4 +19,5 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database') implementation project(':database')
implementation project(':core') implementation project(':core')
implementation project(':interfaces')
} }

View file

@ -19,7 +19,7 @@ import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.extensions.formatColor
import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.ActivityNames
import info.nightscout.androidaps.interfaces.BolusTimer import info.nightscout.androidaps.interfaces.BolusTimer
import info.nightscout.androidaps.interfaces.CarbTimer import info.nightscout.interfaces.CarbTimer
import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.CommandQueue
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.GlucoseUnit