diff --git a/app/build.gradle b/app/build.gradle index 2f474c8590..bab6818d09 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -216,9 +216,6 @@ android { useLibrary "org.apache.http.legacy" - configurations.all { - resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9' - } } allprojects { @@ -257,7 +254,6 @@ dependencies { testImplementation "joda-time:joda-time:$jodatime_version" testImplementation('com.google.truth:truth:1.1.2') { exclude group: "com.google.guava", module: "guava" - exclude group: "com.google.code.findbugs", module: "jsr305" } testImplementation "org.skyscreamer:jsonassert:1.5.0" testImplementation "org.hamcrest:hamcrest-all:1.3" @@ -265,7 +261,6 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03' androidTestImplementation "androidx.test.ext:junit:$androidx_junit" androidTestImplementation "androidx.test:rules:$androidx_rules" - androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2' /* Dagger2 - We are going to use dagger.android which includes * support for Activity and fragment injection so we need to include diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java index a6876a3144..d8af22b203 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java @@ -1,5 +1,7 @@ package info.nightscout.androidaps.plugins.aps.openAPSAMA; +import androidx.annotation.Nullable; + import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -16,7 +18,6 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.nio.charset.StandardCharsets; -import javax.annotation.Nullable; import javax.inject.Inject; import info.nightscout.androidaps.plugins.general.openhumans.OpenHumansUploader; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java index e42b139f3e..5793c7125f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java @@ -1,5 +1,7 @@ package info.nightscout.androidaps.plugins.aps.openAPSSMB; +import androidx.annotation.Nullable; + import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -16,7 +18,6 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.nio.charset.StandardCharsets; -import javax.annotation.Nullable; import javax.inject.Inject; import dagger.android.HasAndroidInjector; diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt index dc72598590..6c8339a650 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt @@ -104,7 +104,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { `when`(SmsManager.getDefault()).thenReturn(smsManager) `when`(sp.getString(R.string.key_smscommunicator_allowednumbers, "")).thenReturn("1234;5678") - smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculatorPlugin, xdripCalibrations, otp, Config(), DateUtil(context, resourceHelper)) + smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculatorPlugin, xdripCalibrations, otp, Config(), DateUtil(context)) smsCommunicatorPlugin.setPluginEnabled(PluginType.GENERAL, true) Mockito.doAnswer { invocation: InvocationOnMock -> val callback = invocation.getArgument(1) diff --git a/app/src/test/java/info/nightscout/androidaps/utils/DateUtilTest.kt b/app/src/test/java/info/nightscout/androidaps/utils/DateUtilTest.kt index 3a70e1a34c..064b843234 100644 --- a/app/src/test/java/info/nightscout/androidaps/utils/DateUtilTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/utils/DateUtilTest.kt @@ -48,22 +48,22 @@ class DateUtilTest : TestBase() { } @Test fun timeStringTest() { - Assert.assertTrue(DateUtil(context, resourceHelper).timeString(Date(1513902750000L)).contains("32")) - Assert.assertTrue(DateUtil(context, resourceHelper).timeString(1513902750000L).contains("32")) + Assert.assertTrue(DateUtil(context).timeString(Date(1513902750000L)).contains("32")) + Assert.assertTrue(DateUtil(context).timeString(1513902750000L).contains("32")) } @Test fun dateAndTimeStringTest() { - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(1513902750000L).contains("22")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(1513902750000L).contains("32")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(Date(1513902750000L)).contains("22")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(Date(1513902750000L)).contains("32")) + Assert.assertTrue(DateUtil(context).dateAndTimeString(1513902750000L).contains("22")) + Assert.assertTrue(DateUtil(context).dateAndTimeString(1513902750000L).contains("32")) + Assert.assertTrue(DateUtil(context).dateAndTimeString(Date(1513902750000L)).contains("22")) + Assert.assertTrue(DateUtil(context).dateAndTimeString(Date(1513902750000L)).contains("32")) } @Test fun dateAndTimeRangeStringTest() { - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22")) - Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32")) + Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22")) + Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32")) + Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22")) + Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32")) } /* diff --git a/core/core_dependencies.gradle b/core/core_dependencies.gradle index 4e0560e2a1..d9dcd24409 100644 --- a/core/core_dependencies.gradle +++ b/core/core_dependencies.gradle @@ -98,10 +98,7 @@ dependencies { exclude group: "org.json", module: "json" } - api('com.google.guava:guava:30.0-jre') { - exclude group: "com.google.code.findbugs", module: "jsr305" - } - api 'com.google.code.findbugs:jsr305:3.0.2' + api 'com.google.guava:guava:30.0-jre' api 'org.mozilla:rhino:1.7.13'