File tree Expand file tree Collapse file tree 5 files changed +10
-0
lines changed
androidMain/kotlin/dev/gitlive/firebase/remoteconfig
commonMain/kotlin/dev/gitlive/firebase/remoteconfig
commonTest/kotlin/dev/gitlive/firebase/remoteconfig
iosMain/kotlin/dev/gitlive/firebase/remoteconfig
jsMain/kotlin/dev/gitlive/firebase/remoteconfig Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import kotlinx.coroutines.tasks.await
1212import kotlinx.datetime.Instant
1313import kotlin.time.Duration
1414import kotlin.time.Duration.Companion.seconds
15+ import kotlin.time.ExperimentalTime
1516import com.google.firebase.remoteconfig.FirebaseRemoteConfig as AndroidFirebaseRemoteConfig
1617import com.google.firebase.remoteconfig.FirebaseRemoteConfigInfo as AndroidFirebaseRemoteConfigInfo
1718import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings as AndroidFirebaseRemoteConfigSettings
@@ -65,6 +66,7 @@ public actual class FirebaseRemoteConfig internal constructor(internal val andro
6566 minimumFetchInterval = minimumFetchIntervalInSeconds.seconds,
6667 )
6768
69+ @OptIn(ExperimentalTime ::class )
6870 private fun AndroidFirebaseRemoteConfigInfo.asCommon (): FirebaseRemoteConfigInfo {
6971 val lastFetchStatus = when (lastFetchStatus) {
7072 AndroidFirebaseRemoteConfig .LAST_FETCH_STATUS_SUCCESS -> FetchStatus .Success
Original file line number Diff line number Diff line change 11package dev.gitlive.firebase.remoteconfig
22
33import kotlinx.datetime.Instant
4+ import kotlin.time.ExperimentalTime
45
56/* * Wraps the current state of the [FirebaseRemoteConfig] singleton object. */
7+ @OptIn(ExperimentalTime ::class )
68public data class FirebaseRemoteConfigInfo (
79 /* *
810 * Gets the current settings of the [FirebaseRemoteConfig] singleton object.
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import kotlin.test.Test
1717import kotlin.test.assertEquals
1818import kotlin.time.Duration.Companion.minutes
1919import kotlin.time.Duration.Companion.seconds
20+ import kotlin.time.ExperimentalTime
2021
2122expect val context: Any
2223expect annotation class IgnoreForAndroidUnitTest ()
@@ -99,6 +100,7 @@ class FirebaseRemoteConfigTest {
99100 )
100101 }
101102
103+ @OptIn(ExperimentalTime ::class )
102104 @Test
103105 fun testGetInfo () = runTest {
104106 assertEquals(
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import platform.Foundation.NSError
2020import kotlin.time.Duration
2121import kotlin.time.Duration.Companion.seconds
2222import kotlin.time.DurationUnit
23+ import kotlin.time.ExperimentalTime
2324
2425public val FirebaseRemoteConfig .ios: FIRRemoteConfig get() = FIRRemoteConfig .remoteConfig()
2526
@@ -44,6 +45,7 @@ public actual class FirebaseRemoteConfig internal constructor(internal val ios:
4445 }.flatten().toMap()
4546 }
4647
48+ @OptIn(ExperimentalTime ::class )
4749 public actual val info: FirebaseRemoteConfigInfo
4850 get() {
4951 return FirebaseRemoteConfigInfo (
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import kotlinx.datetime.Instant
1010import kotlin.js.json
1111import kotlin.time.Duration
1212import kotlin.time.Duration.Companion.milliseconds
13+ import kotlin.time.ExperimentalTime
1314
1415public actual val Firebase .remoteConfig: FirebaseRemoteConfig
1516 get() = rethrow { FirebaseRemoteConfig (getRemoteConfig()) }
@@ -24,6 +25,7 @@ public actual class FirebaseRemoteConfig internal constructor(internal val js: R
2425 public actual val all: Map <String , FirebaseRemoteConfigValue >
2526 get() = rethrow { getAllKeys().associateWith { getValue(it) } }
2627
28+ @OptIn(ExperimentalTime ::class )
2729 public actual val info: FirebaseRemoteConfigInfo
2830 get() = rethrow {
2931 FirebaseRemoteConfigInfo (
You can’t perform that action at this time.
0 commit comments