Skip to content

Commit bb1a276

Browse files
authored
Merge pull request #3098 from nightscout/dev
3.2.0.3
2 parents c31617f + 8d50cb7 commit bb1a276

File tree

102 files changed

+2699
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2699
-216
lines changed

.circleci/config.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2.1
55
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
66
orbs:
77
android: circleci/android@2.3.0
8-
codecov: codecov/codecov@3.2.4
8+
codecov: codecov/codecov@3.3.0
99

1010
jobs:
1111
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
@@ -14,7 +14,7 @@ jobs:
1414
executor:
1515
name: android/android-machine
1616
resource-class: large
17-
tag: 2023.07.1
17+
tag: 2023.11.1
1818

1919
steps:
2020
- checkout
@@ -34,11 +34,19 @@ jobs:
3434
- android/run-tests:
3535
test-command: ./gradlew --stacktrace jacocoAllDebugReport
3636

37-
# And finally run the release build
38-
# - run:
39-
# name: Assemble release build
40-
# command: |
41-
# ./gradlew assembleRelease
37+
- run:
38+
name: Save test results
39+
command: |
40+
mkdir -p ~/test-results/junit/
41+
find . -type f -regex ".*/build/outputs/androidTest-results/.*xml" -exec cp {} ~/test-results/junit/ \;
42+
when: always
43+
44+
- store_test_results:
45+
path: ~/test-results
46+
47+
- store_artifacts:
48+
path: ~/test-results/junit
49+
4250
- codecov/upload:
4351
file: './build/reports/jacoco/jacocoAllDebugReport/jacocoAllDebugReport.xml'
4452

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ android {
153153
//Deleting it causes a binding error
154154
buildFeatures {
155155
dataBinding = true
156+
buildConfig = true
156157
}
157158
}
158159

app/src/main/kotlin/app/aaps/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
276276
})
277277
// Setup views on 2nd and next activity start
278278
// On 1st start app is still initializing, start() is delayed and run from EventAppInitialized
279-
if (config.appInitialized) start()
279+
if (config.appInitialized) setupViews()
280280
}
281281

282282
private fun start() {

app/src/main/kotlin/app/aaps/di/PluginsListModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import app.aaps.plugins.source.PoctechPlugin
4747
import app.aaps.plugins.source.RandomBgPlugin
4848
import app.aaps.plugins.source.TomatoPlugin
4949
import app.aaps.plugins.source.XdripSourcePlugin
50-
import app.aaps.plugins.sync.dataBroadcaster.DataBroadcastPlugin
50+
import app.aaps.plugins.sync.tizen.TizenPlugin
5151
import app.aaps.plugins.sync.nsclient.NSClientPlugin
5252
import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin
5353
import app.aaps.plugins.sync.openhumans.OpenHumansUploaderPlugin
@@ -350,7 +350,7 @@ abstract class PluginsListModule {
350350
@AllConfigs
351351
@IntoMap
352352
@IntKey(368)
353-
abstract fun bindDataBroadcastPlugin(plugin: DataBroadcastPlugin): PluginBase
353+
abstract fun bindDataBroadcastPlugin(plugin: TizenPlugin): PluginBase
354354

355355
@Binds
356356
@AllConfigs

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath("com.android.tools.build:gradle:8.1.3")
11+
classpath("com.android.tools.build:gradle:8.2.0")
1212
classpath("com.google.gms:google-services:4.4.0")
1313
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9")
1414

@@ -22,7 +22,7 @@ buildscript {
2222
}
2323

2424
plugins {
25-
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
25+
id("org.jlleitschuh.gradle.ktlint") version "12.0.3"
2626
}
2727

2828
allprojects {

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
object KtsBuildVersions {
22

3-
const val gradle = "8.1.3"
4-
const val kotlin = "1.9.0"
3+
const val gradle = "8.2.0"
4+
const val kotlin = "1.9.10"
55
}
66

77
plugins {

buildSrc/src/main/kotlin/Libs.kt

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,11 @@ object Libs {
152152
}
153153

154154
object Mockito {
155+
private const val mockitoVersion = "5.6.0"
155156

156-
const val jupiter = "org.mockito:mockito-junit-jupiter:5.6.0"
157+
const val android = "org.mockito:mockito-android:$mockitoVersion"
158+
const val core = "org.mockito:mockito-core:$mockitoVersion"
159+
const val jupiter = "org.mockito:mockito-junit-jupiter:$mockitoVersion"
157160
const val kotlin = "org.mockito.kotlin:mockito-kotlin:5.1.0"
158161
}
159162

@@ -197,19 +200,5 @@ object Libs {
197200
const val commonCodecs = "commons-codec:commons-codec:1.16.0"
198201
const val kulid = "com.github.guepardoapps:kulid:2.0.0.0"
199202
const val xstream = "com.thoughtworks.xstream:xstream:1.4.20"
200-
201-
const val ormLite = "4.46"
202-
203-
const val junit = "4.13.2"
204-
const val mockito = "5.6.0"
205-
const val dexmaker = "1.2"
206-
const val byteBuddy = "1.12.8"
207-
208-
const val androidx_junit = "1.1.5"
209-
const val androidx_rules = "1.5.0"
210-
211-
const val kotlinx_datetime = "0.4.1"
212-
const val kotlinx_serialization = "1.6.0"
213-
214-
const val caverock_androidsvg = "1.4"
203+
const val connectiqSdk = "com.garmin.connectiq:ciq-companion-app-sdk:2.0.3@aar"
215204
}

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion
22

33
object Versions {
44

5-
const val appVersion = "3.2.0.2"
5+
const val appVersion = "3.2.0.3"
66
const val versionCode = 1500
77

88
const val ndkVersion = "21.1.6352462"

buildSrc/src/main/kotlin/test-module-dependencies.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ dependencies {
2222
androidTestImplementation(Libs.AndroidX.Test.rules)
2323
androidTestImplementation(Libs.Google.truth)
2424
androidTestImplementation(Libs.AndroidX.Test.uiAutomator)
25+
androidTestImplementation(Libs.Mockito.core)
26+
androidTestImplementation(Libs.Mockito.android)
27+
androidTestImplementation(Libs.Mockito.kotlin)
2528
}
2629

2730
tasks.withType<Test> {

core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/PumpSync.kt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package app.aaps.core.interfaces.pump
22

3+
import app.aaps.core.interfaces.db.GlucoseUnit
34
import app.aaps.core.interfaces.profile.Profile
45
import app.aaps.core.interfaces.pump.defs.PumpType
56
import app.aaps.core.interfaces.utils.DateUtil
@@ -257,6 +258,26 @@ interface PumpSync {
257258
**/
258259
fun insertTherapyEventIfNewWithTimestamp(timestamp: Long, type: DetailedBolusInfo.EventType, note: String? = null, pumpId: Long? = null, pumpType: PumpType, pumpSerial: String): Boolean
259260

261+
/**
262+
* Synchronization of FINGER_STICK_BG_VALUE events
263+
*
264+
* Assuming there will be no clash on timestamp from different pumps
265+
* only timestamp and type is compared
266+
*
267+
* If db record doesn't exist, new record is created.
268+
* If exists, data is ignored
269+
*
270+
* @param timestamp timestamp of event from pump history
271+
* @param glucose glucose value
272+
* @param glucoseUnit glucose unit
273+
* @param note note
274+
* @param pumpId pump id from history if available
275+
* @param pumpType pump type like PumpType.ACCU_CHEK_COMBO
276+
* @param pumpSerial pump serial number
277+
* @return true if new record is created
278+
**/
279+
fun insertFingerBgIfNewWithTimestamp(timestamp: Long, glucose: Double, glucoseUnit: GlucoseUnit, note: String? = null, pumpId: Long? = null, pumpType: PumpType, pumpSerial: String): Boolean
280+
260281
/**
261282
* Create an announcement
262283
*

0 commit comments

Comments
 (0)