From d3e6fb0df939e232f234db121a4f83a6fd6156e3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 27 Sep 2023 09:30:12 +0200 Subject: [PATCH] :pump:virtual cleanup --- .../main/kotlin/app/aaps/activities/MyPreferenceFragment.kt | 2 +- app/src/main/kotlin/app/aaps/di/AppComponent.kt | 2 +- app/src/main/kotlin/app/aaps/di/PluginsListModule.kt | 2 +- .../kotlin/app/aaps/interfaces/pump/PumpEnactResultTest.kt | 2 +- .../test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt | 2 +- .../aaps/plugins/constraints/ConstraintsCheckerImplTest.kt | 2 +- .../app/aaps/plugins/constraints/safety/SafetyPluginTest.kt | 2 +- pump/virtual/build.gradle | 2 +- .../app/aaps}/pump/virtual/VirtualPumpFragment.kt | 6 +++--- .../app/aaps}/pump/virtual/VirtualPumpPlugin.kt | 6 +++--- .../app/aaps}/pump/virtual/di/VirtualPumpModule.kt | 6 +++--- .../aaps}/pump/virtual/events/EventVirtualPumpUpdateGui.kt | 2 +- .../pump/virtual/extensions/PumpEnactResultExtension.kt | 2 +- .../app/aaps}/pump/virtual/VirtualPumpPluginUTest.kt | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) rename pump/virtual/src/main/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/VirtualPumpFragment.kt (96%) rename pump/virtual/src/main/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/VirtualPumpPlugin.kt (99%) rename pump/virtual/src/main/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/di/VirtualPumpModule.kt (77%) rename pump/virtual/src/main/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/events/EventVirtualPumpUpdateGui.kt (71%) rename pump/virtual/src/main/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/extensions/PumpEnactResultExtension.kt (97%) rename pump/virtual/src/test/{java/info/nightscout => kotlin/app/aaps}/pump/virtual/VirtualPumpPluginUTest.kt (98%) diff --git a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt index 7167a8fdb9..2355f56d02 100644 --- a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt @@ -60,6 +60,7 @@ import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin import app.aaps.plugins.sync.openhumans.OpenHumansUploaderPlugin import app.aaps.plugins.sync.tidepool.TidepoolPlugin import app.aaps.plugins.sync.xdrip.XdripPlugin +import app.aaps.pump.virtual.VirtualPumpPlugin import dagger.android.support.AndroidSupportInjection import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin import info.nightscout.androidaps.danaRv2.DanaRv2Plugin @@ -71,7 +72,6 @@ import info.nightscout.pump.combo.ComboPlugin import info.nightscout.pump.combov2.ComboV2Plugin import info.nightscout.pump.diaconn.DiaconnG8Plugin import info.nightscout.pump.medtrum.MedtrumPlugin -import info.nightscout.pump.virtual.VirtualPumpPlugin import javax.inject.Inject class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChangeListener { diff --git a/app/src/main/kotlin/app/aaps/di/AppComponent.kt b/app/src/main/kotlin/app/aaps/di/AppComponent.kt index 89158a92ab..65aaf8ea01 100644 --- a/app/src/main/kotlin/app/aaps/di/AppComponent.kt +++ b/app/src/main/kotlin/app/aaps/di/AppComponent.kt @@ -14,6 +14,7 @@ import app.aaps.plugins.main.di.PluginsModule import app.aaps.plugins.source.di.SourceModule import app.aaps.plugins.sync.di.OpenHumansModule import app.aaps.plugins.sync.di.SyncModule +import app.aaps.pump.virtual.di.VirtualPumpModule import app.aaps.shared.impl.di.SharedImplModule import app.aaps.ui.di.UiModule import dagger.BindsInstance @@ -36,7 +37,6 @@ import info.nightscout.pump.dana.di.DanaModule import info.nightscout.pump.danars.di.DanaRSModule import info.nightscout.pump.diaconn.di.DiaconnG8Module import info.nightscout.pump.medtrum.di.MedtrumModule -import info.nightscout.pump.virtual.di.VirtualPumpModule import info.nightscout.workflow.di.WorkflowModule import javax.inject.Singleton diff --git a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt index e84d9a673a..00d10373ca 100644 --- a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt +++ b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt @@ -52,6 +52,7 @@ import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin import app.aaps.plugins.sync.openhumans.OpenHumansUploaderPlugin import app.aaps.plugins.sync.tidepool.TidepoolPlugin import app.aaps.plugins.sync.xdrip.XdripPlugin +import app.aaps.pump.virtual.VirtualPumpPlugin import dagger.Binds import dagger.Module import dagger.multibindings.IntKey @@ -68,7 +69,6 @@ import info.nightscout.pump.combo.ComboPlugin import info.nightscout.pump.combov2.ComboV2Plugin import info.nightscout.pump.diaconn.DiaconnG8Plugin import info.nightscout.pump.medtrum.MedtrumPlugin -import info.nightscout.pump.virtual.VirtualPumpPlugin import javax.inject.Qualifier @Suppress("unused") diff --git a/implementation/src/test/kotlin/app/aaps/interfaces/pump/PumpEnactResultTest.kt b/implementation/src/test/kotlin/app/aaps/interfaces/pump/PumpEnactResultTest.kt index d45187583d..07266e1a2b 100644 --- a/implementation/src/test/kotlin/app/aaps/interfaces/pump/PumpEnactResultTest.kt +++ b/implementation/src/test/kotlin/app/aaps/interfaces/pump/PumpEnactResultTest.kt @@ -3,11 +3,11 @@ package app.aaps.interfaces.pump import app.aaps.core.interfaces.pump.PumpEnactResult import app.aaps.core.main.pump.toHtml import app.aaps.plugins.aps.loop.extensions.json +import app.aaps.pump.virtual.extensions.toText import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.pump.virtual.extensions.toText import org.json.JSONObject import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt index 963d8496c7..0ea1f954b7 100644 --- a/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt +++ b/plugins/aps/src/test/kotlin/app/aaps/plugins/aps/loop/LoopPluginTest.kt @@ -20,11 +20,11 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.fabric.FabricPrivacy import app.aaps.core.nssdk.interfaces.RunningConfiguration import app.aaps.database.impl.AppRepository +import app.aaps.pump.virtual.VirtualPumpPlugin import app.aaps.shared.tests.TestBase import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.pump.virtual.VirtualPumpPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.Mock diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index f8fe180a12..2853dec357 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -26,6 +26,7 @@ import app.aaps.plugins.constraints.objectives.ObjectivesPlugin import app.aaps.plugins.constraints.objectives.objectives.Objective import app.aaps.plugins.constraints.safety.SafetyPlugin import app.aaps.plugins.source.GlimpPlugin +import app.aaps.pump.virtual.VirtualPumpPlugin import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector @@ -41,7 +42,6 @@ import info.nightscout.pump.dana.DanaPump import info.nightscout.pump.dana.R import info.nightscout.pump.dana.database.DanaHistoryDatabase import info.nightscout.pump.danars.DanaRSPlugin -import info.nightscout.pump.virtual.VirtualPumpPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.Mock diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt index d860f48f3d..b3c70a1a30 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt @@ -16,11 +16,11 @@ import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import app.aaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import app.aaps.plugins.source.GlimpPlugin +import app.aaps.pump.virtual.VirtualPumpPlugin import app.aaps.shared.tests.TestBaseWithProfile import com.google.common.truth.Truth.assertThat import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector -import info.nightscout.pump.virtual.VirtualPumpPlugin import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.Mock diff --git a/pump/virtual/build.gradle b/pump/virtual/build.gradle index 63fbad9d0d..3329ea7b62 100644 --- a/pump/virtual/build.gradle +++ b/pump/virtual/build.gradle @@ -13,7 +13,7 @@ apply from: "${project.rootDir}/core/main/jacoco_global.gradle" android { - namespace 'info.nightscout.pump.virtual' + namespace 'app.aaps.pump.virtual' } dependencies { diff --git a/pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpFragment.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpFragment.kt similarity index 96% rename from pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpFragment.kt rename to pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpFragment.kt index a4dd016ac6..2f0ff58689 100644 --- a/pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpFragment.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpFragment.kt @@ -1,4 +1,4 @@ -package info.nightscout.pump.virtual +package app.aaps.pump.virtual import android.os.Bundle import android.os.Handler @@ -21,9 +21,9 @@ import app.aaps.core.interfaces.utils.DecimalFormatter import app.aaps.core.interfaces.utils.T import app.aaps.core.interfaces.utils.fabric.FabricPrivacy import app.aaps.core.main.extensions.toStringFull +import app.aaps.pump.virtual.databinding.VirtualPumpFragmentBinding +import app.aaps.pump.virtual.events.EventVirtualPumpUpdateGui import dagger.android.support.DaggerFragment -import info.nightscout.pump.virtual.databinding.VirtualPumpFragmentBinding -import info.nightscout.pump.virtual.events.EventVirtualPumpUpdateGui import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpPlugin.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt similarity index 99% rename from pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpPlugin.kt rename to pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt index b7bc75cdee..42984a8397 100644 --- a/pump/virtual/src/main/java/info/nightscout/pump/virtual/VirtualPumpPlugin.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.pump.virtual +package app.aaps.pump.virtual import android.os.SystemClock import androidx.preference.PreferenceFragmentCompat @@ -39,9 +39,9 @@ import app.aaps.core.main.events.EventNewNotification import app.aaps.core.main.extensions.convertedToAbsolute import app.aaps.core.main.extensions.plannedRemainingMinutes import app.aaps.core.utils.fabric.InstanceId +import app.aaps.pump.virtual.events.EventVirtualPumpUpdateGui +import app.aaps.pump.virtual.extensions.toText import dagger.android.HasAndroidInjector -import info.nightscout.pump.virtual.events.EventVirtualPumpUpdateGui -import info.nightscout.pump.virtual.extensions.toText import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONException diff --git a/pump/virtual/src/main/java/info/nightscout/pump/virtual/di/VirtualPumpModule.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/di/VirtualPumpModule.kt similarity index 77% rename from pump/virtual/src/main/java/info/nightscout/pump/virtual/di/VirtualPumpModule.kt rename to pump/virtual/src/main/kotlin/app/aaps/pump/virtual/di/VirtualPumpModule.kt index 28da6e32f7..eb86053387 100644 --- a/pump/virtual/src/main/java/info/nightscout/pump/virtual/di/VirtualPumpModule.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/di/VirtualPumpModule.kt @@ -1,11 +1,11 @@ -package info.nightscout.pump.virtual.di +package app.aaps.pump.virtual.di import app.aaps.core.interfaces.pump.VirtualPump +import app.aaps.pump.virtual.VirtualPumpFragment +import app.aaps.pump.virtual.VirtualPumpPlugin import dagger.Binds import dagger.Module import dagger.android.ContributesAndroidInjector -import info.nightscout.pump.virtual.VirtualPumpFragment -import info.nightscout.pump.virtual.VirtualPumpPlugin @Module( includes = [ diff --git a/pump/virtual/src/main/java/info/nightscout/pump/virtual/events/EventVirtualPumpUpdateGui.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/events/EventVirtualPumpUpdateGui.kt similarity index 71% rename from pump/virtual/src/main/java/info/nightscout/pump/virtual/events/EventVirtualPumpUpdateGui.kt rename to pump/virtual/src/main/kotlin/app/aaps/pump/virtual/events/EventVirtualPumpUpdateGui.kt index 33c9ccf81f..ff9a473455 100644 --- a/pump/virtual/src/main/java/info/nightscout/pump/virtual/events/EventVirtualPumpUpdateGui.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/events/EventVirtualPumpUpdateGui.kt @@ -1,4 +1,4 @@ -package info.nightscout.pump.virtual.events +package app.aaps.pump.virtual.events import app.aaps.core.interfaces.rx.events.EventUpdateGui diff --git a/pump/virtual/src/main/java/info/nightscout/pump/virtual/extensions/PumpEnactResultExtension.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/extensions/PumpEnactResultExtension.kt similarity index 97% rename from pump/virtual/src/main/java/info/nightscout/pump/virtual/extensions/PumpEnactResultExtension.kt rename to pump/virtual/src/main/kotlin/app/aaps/pump/virtual/extensions/PumpEnactResultExtension.kt index 3ce896db3e..00af415c61 100644 --- a/pump/virtual/src/main/java/info/nightscout/pump/virtual/extensions/PumpEnactResultExtension.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/extensions/PumpEnactResultExtension.kt @@ -1,4 +1,4 @@ -package info.nightscout.pump.virtual.extensions +package app.aaps.pump.virtual.extensions import app.aaps.core.interfaces.pump.PumpEnactResult import app.aaps.core.interfaces.resources.ResourceHelper diff --git a/pump/virtual/src/test/java/info/nightscout/pump/virtual/VirtualPumpPluginUTest.kt b/pump/virtual/src/test/kotlin/app/aaps/pump/virtual/VirtualPumpPluginUTest.kt similarity index 98% rename from pump/virtual/src/test/java/info/nightscout/pump/virtual/VirtualPumpPluginUTest.kt rename to pump/virtual/src/test/kotlin/app/aaps/pump/virtual/VirtualPumpPluginUTest.kt index 639275a25d..81fb050616 100644 --- a/pump/virtual/src/test/java/info/nightscout/pump/virtual/VirtualPumpPluginUTest.kt +++ b/pump/virtual/src/test/kotlin/app/aaps/pump/virtual/VirtualPumpPluginUTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.pump.virtual +package app.aaps.pump.virtual import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.db.PersistenceLayer