libs update

This commit is contained in:
Milos Kozak 2023-08-03 11:03:57 +02:00
parent 009544a458
commit e3dc8fb777
9 changed files with 29 additions and 25 deletions

View file

@ -119,7 +119,7 @@ android {
}
flavorDimensions "standard"
flavorDimensions = ["standard"]
productFlavors {
full {
applicationId "info.nightscout.androidaps"

View file

@ -24,10 +24,10 @@ buildscript {
commonslang3_version = '3.13.0'
commonscodec_version = '1.16.0'
guava_version = '32.1.2-jre'
jodatime_version = '2.10.14'
jodatime_version = '2.12.5'
work_version = '2.8.1'
tink_version = '1.10.0'
json_version = '20220320'
json_version = '20230618'
joda_version = '2.12.5'
swipe_version = '1.1.0'
@ -39,7 +39,7 @@ buildscript {
okhttp3_version = '4.11.0'
byteBuddy_version = '1.12.8'
androidx_junit_version = '1.1.4'
androidx_junit_version = '1.1.5'
androidx_rules_version = '1.5.0'
rxandroidble_version = '1.12.1'

View file

@ -5,6 +5,7 @@ plugins {
}
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
android {

View file

@ -1,6 +1,6 @@
android {
flavorDimensions "standard"
flavorDimensions = ["standard"]
productFlavors {
full {
dimension "standard"

View file

@ -8,7 +8,7 @@ import info.nightscout.database.entities.BolusCalculatorResult
import info.nightscout.database.entities.TherapyEvent
import info.nightscout.interfaces.pump.DetailedBolusInfo
import org.apache.commons.lang3.builder.EqualsBuilder
import org.junit.Assert
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.mockito.Mock
@ -18,14 +18,14 @@ class DetailedBolusInfoTest : TestBase() {
@Test fun toStringShouldBeOverloaded() {
val detailedBolusInfo = DetailedBolusInfo()
Assert.assertEquals(true, detailedBolusInfo.toJsonString().contains("insulin"))
Assertions.assertEquals(true, detailedBolusInfo.toJsonString().contains("insulin"))
}
@Test fun copyShouldCopyAllProperties() {
val d1 = DetailedBolusInfo()
d1.deliverAtTheLatest = 123
val d2 = d1.copy()
Assert.assertEquals(true, EqualsBuilder.reflectionEquals(d2, d1))
Assertions.assertTrue(EqualsBuilder.reflectionEquals(d2, d1, arrayListOf("id")))
}
private fun fromJsonString(json: String): DetailedBolusInfo =
@ -41,10 +41,10 @@ class DetailedBolusInfoTest : TestBase() {
detailedBolusInfo.eventType = DetailedBolusInfo.EventType.BOLUS_WIZARD
val serialized = detailedBolusInfo.toJsonString()
val deserialized = fromJsonString(serialized)
Assert.assertEquals(1L, deserialized.bolusCalculatorResult?.timestamp)
Assert.assertEquals(DetailedBolusInfo.EventType.BOLUS_WIZARD, deserialized.eventType)
Assertions.assertEquals(1L, deserialized.bolusCalculatorResult?.timestamp)
Assertions.assertEquals(DetailedBolusInfo.EventType.BOLUS_WIZARD, deserialized.eventType)
// Context should be excluded
Assert.assertNull(deserialized.context)
Assertions.assertNull(deserialized.context)
}
@Test
@ -56,12 +56,12 @@ class DetailedBolusInfoTest : TestBase() {
detailedBolusInfo.glucoseType = DetailedBolusInfo.MeterType.FINGER
val therapyEvent = detailedBolusInfo.createTherapyEvent()
Assert.assertEquals(1000L, therapyEvent.timestamp)
Assert.assertEquals(TherapyEvent.Type.MEAL_BOLUS, therapyEvent.type)
Assert.assertEquals(TherapyEvent.GlucoseUnit.MGDL, therapyEvent.glucoseUnit)
Assert.assertEquals("note", therapyEvent.note)
Assert.assertEquals(180.0, therapyEvent.glucose)
Assert.assertEquals(TherapyEvent.MeterType.FINGER, therapyEvent.glucoseType)
Assertions.assertEquals(1000L, therapyEvent.timestamp)
Assertions.assertEquals(TherapyEvent.Type.MEAL_BOLUS, therapyEvent.type)
Assertions.assertEquals(TherapyEvent.GlucoseUnit.MGDL, therapyEvent.glucoseUnit)
Assertions.assertEquals("note", therapyEvent.note)
Assertions.assertEquals(180.0, therapyEvent.glucose)
Assertions.assertEquals(TherapyEvent.MeterType.FINGER, therapyEvent.glucoseType)
}
@Test
@ -72,9 +72,9 @@ class DetailedBolusInfoTest : TestBase() {
detailedBolusInfo.insulin = 7.0
val bolus = detailedBolusInfo.createBolus()
Assert.assertEquals(1000L, bolus.timestamp)
Assert.assertEquals(Bolus.Type.SMB, bolus.type)
Assert.assertEquals(7.0, bolus.amount, 0.01)
Assertions.assertEquals(1000L, bolus.timestamp)
Assertions.assertEquals(Bolus.Type.SMB, bolus.type)
Assertions.assertEquals(7.0, bolus.amount, 0.01)
}
@Test
@ -84,8 +84,8 @@ class DetailedBolusInfoTest : TestBase() {
detailedBolusInfo.carbs = 6.0
val carbs = detailedBolusInfo.createCarbs()
Assert.assertEquals(1000L, carbs.timestamp)
Assert.assertEquals(6.0, carbs.amount, 0.01)
Assertions.assertEquals(1000L, carbs.timestamp)
Assertions.assertEquals(6.0, carbs.amount, 0.01)
}
private fun createBolusCalculatorResult(): BolusCalculatorResult =

View file

@ -7,11 +7,11 @@ dependencies {
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
//testImplementation "org.mockito:mockito-inline:$mockito_version"
testImplementation "joda-time:joda-time:$jodatime_version"
testImplementation "com.google.truth:truth:1.1.3"
testImplementation 'com.google.truth:truth:1.1.5'
testImplementation "org.skyscreamer:jsonassert:1.5.0"
testImplementation "org.hamcrest:hamcrest-all:1.3"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_junit_version"
androidTestImplementation "androidx.test:rules:$androidx_rules_version"

View file

@ -1,9 +1,11 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
}
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
android {
namespace 'info.nightscout.core.ui'

View file

@ -6,6 +6,7 @@ plugins {
}
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
android {

View file

@ -57,7 +57,7 @@ android {
viewBinding true
}
flavorDimensions "standard"
flavorDimensions = ["standard"]
productFlavors {
full {
applicationId "info.nightscout.androidaps"