From 5d857dd203f3a8c1910f9c6a239e025ddbc1abdb Mon Sep 17 00:00:00 2001 From: Konstantin Tskhovrebov Date: Tue, 23 Apr 2024 16:07:00 +0200 Subject: [PATCH] [resources] Mark new API as experimental. --- .../org/jetbrains/compose/resources/PluralStringResources.kt | 2 ++ .../org/jetbrains/compose/resources/StringArrayResources.kt | 1 + .../kotlin/org/jetbrains/compose/resources/StringResources.kt | 2 ++ 3 files changed, 5 insertions(+) diff --git a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt index 75227432d6..27be9337f5 100644 --- a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt +++ b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt @@ -55,6 +55,7 @@ suspend fun getPluralString(resource: PluralStringResource, quantity: Int): Stri * * @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file. */ +@ExperimentalResourceApi suspend fun getPluralString( environment: ResourceEnvironment, resource: PluralStringResource, @@ -129,6 +130,7 @@ suspend fun getPluralString(resource: PluralStringResource, quantity: Int, varar * * @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file. */ +@ExperimentalResourceApi suspend fun getPluralString( environment: ResourceEnvironment, resource: PluralStringResource, diff --git a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt index c44ba23798..e89aa5c600 100644 --- a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt +++ b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt @@ -57,6 +57,7 @@ suspend fun getStringArray(resource: StringArrayResource): List = * * @throws IllegalStateException if the string array with the given ID is not found. */ +@ExperimentalResourceApi suspend fun getStringArray( environment: ResourceEnvironment, resource: StringArrayResource diff --git a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt index 91e62bdd1a..3cce39b722 100644 --- a/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt +++ b/components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt @@ -50,6 +50,7 @@ suspend fun getString(resource: StringResource): String = * * @throws IllegalArgumentException If the provided ID is not found in the resource file. */ +@ExperimentalResourceApi suspend fun getString(environment: ResourceEnvironment, resource: StringResource): String = loadString(resource, DefaultResourceReader, environment) @@ -108,6 +109,7 @@ suspend fun getString(resource: StringResource, vararg formatArgs: Any): String * * @throws IllegalArgumentException If the provided ID is not found in the resource file. */ +@ExperimentalResourceApi suspend fun getString( environment: ResourceEnvironment, resource: StringResource,