Skip to content

Commit b50eb6f

Browse files
committed
fix(build): expose kotlinx-coroutines to consumers
SamsungHealthObserver.observe returns a Flow, but kotlinx-coroutines-android was an implementation dependency, published with runtime scope, so apps couldn't compile calls to observe(). A probe module depending only on the published library found it, and JitPack's POM for 18b2246 confirms the runtime scope. Changes: - library/build.gradle.kts: kotlinx-coroutines-android as api Tests: the published POM lists kotlinx-coroutines-android with compile scope; a consumer module without the Samsung SDK now compiles read, aggregate, insert, requestPermissions and observe calls; 67 unit tests, apiCheck and ktlint green.
1 parent 1414789 commit b50eb6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎library/build.gradle.kts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ kotlin {
5757
dependencies {
5858
// Samsung's license forbids redistribution: consumers add the AAR themselves.
5959
compileOnly(samsungHealthData)
60-
implementation(libs.kotlinx.coroutines.android)
60+
// api: Flow is part of the public API (SamsungHealthObserver.observe).
61+
api(libs.kotlinx.coroutines.android)
6162
api(libs.kotlinx.serialization.json)
6263

6364
testImplementation(samsungHealthData)

0 commit comments

Comments
 (0)