Browse Source
Used by Compose Hot Reload to mark a related accessor as dirty if the hash is changed after reloading of new accessors. Fixes [CMP-8513](https://youtrack.jetbrains.com/issue/CMP-8513) ## Release Notes N/Apull/5392/head v1.9.10+dev2818
24 changed files with 850 additions and 5 deletions
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
package org.jetbrains.compose.resources |
||||
|
||||
@Suppress("unused") |
||||
@Retention(AnnotationRetention.BINARY) |
||||
annotation class ResourceContentHash(val hash: Int) |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(50_967_853) |
||||
internal val Res.string.android_str: StringResource by lazy { |
||||
StringResource("string:android_str", "android_str", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.androidMain.cvr", 10, 39), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectAndroidMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("android_str", Res.string.android_str) |
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal actual val Res.allDrawableResources: Map<String, DrawableResource> by lazy { |
||||
val map = mutableMapOf<String, DrawableResource>() |
||||
_collectCommonMainDrawable0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy { |
||||
val map = mutableMapOf<String, StringResource>() |
||||
_collectAndroidMainString0Resources(map) |
||||
_collectCommonMainString0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy { |
||||
val map = mutableMapOf<String, StringArrayResource>() |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy { |
||||
val map = mutableMapOf<String, PluralStringResource>() |
||||
_collectCommonMainPlurals0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy { |
||||
val map = mutableMapOf<String, FontResource>() |
||||
_collectCommonMainFont0Resources(map) |
||||
return@lazy map |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.LanguageQualifier |
||||
import org.jetbrains.compose.resources.RegionQualifier |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.ThemeQualifier |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(-1_453_679_588) |
||||
internal val Res.drawable._3_strange_name: DrawableResource by lazy { |
||||
DrawableResource("drawable:_3_strange_name", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/3-strange-name.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_453_679_588) |
||||
internal val Res.drawable.camelCaseName: DrawableResource by lazy { |
||||
DrawableResource("drawable:camelCaseName", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/camelCaseName.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_453_679_588) |
||||
internal val Res.drawable.`is`: DrawableResource by lazy { |
||||
DrawableResource("drawable:is", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/is.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-737_454_820) |
||||
internal val Res.drawable.vector: DrawableResource by lazy { |
||||
DrawableResource("drawable:vector", setOf( |
||||
ResourceItem(setOf(LanguageQualifier("ast"), ), "${MD}drawable-ast/vector.xml", -1, -1), |
||||
ResourceItem(setOf(LanguageQualifier("au"), RegionQualifier("US"), ), "${MD}drawable-au-rUS/vector.xml", -1, -1), |
||||
ResourceItem(setOf(ThemeQualifier.DARK, LanguageQualifier("ge"), ), "${MD}drawable-dark-ge/vector.xml", -1, -1), |
||||
ResourceItem(setOf(LanguageQualifier("en"), ), "${MD}drawable-en/vector.xml", -1, -1), |
||||
ResourceItem(setOf(), "${MD}drawable/vector.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_453_679_588) |
||||
internal val Res.drawable.vector_2: DrawableResource by lazy { |
||||
DrawableResource("drawable:vector_2", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/vector_2.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainDrawable0Resources(map: MutableMap<String, DrawableResource>) { |
||||
map.put("_3_strange_name", Res.drawable._3_strange_name) |
||||
map.put("camelCaseName", Res.drawable.camelCaseName) |
||||
map.put("is", Res.drawable.`is`) |
||||
map.put("vector", Res.drawable.vector) |
||||
map.put("vector_2", Res.drawable.vector_2) |
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.LanguageQualifier |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(1_893_715_104) |
||||
internal val Res.font.emptyFont: FontResource by lazy { |
||||
FontResource("font:emptyFont", setOf( |
||||
ResourceItem(setOf(LanguageQualifier("en"), ), "${MD}font-en/emptyFont.otf", -1, -1), |
||||
ResourceItem(setOf(), "${MD}font/emptyFont.otf", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainFont0Resources(map: MutableMap<String, FontResource>) { |
||||
map.put("emptyFont", Res.font.emptyFont) |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(-199_361_196) |
||||
internal val Res.plurals.numberOfSongsAvailable: PluralStringResource by lazy { |
||||
PluralStringResource("plurals:numberOfSongsAvailable", "numberOfSongsAvailable", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 10, 124), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainPlurals0Resources(map: MutableMap<String, PluralStringResource>) { |
||||
map.put("numberOfSongsAvailable", Res.plurals.numberOfSongsAvailable) |
||||
} |
||||
@ -0,0 +1,81 @@
@@ -0,0 +1,81 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(405_464_824) |
||||
internal val Res.string.PascalCase: StringResource by lazy { |
||||
StringResource("string:PascalCase", "PascalCase", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 172, 34), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_118_290_776) |
||||
internal val Res.string._1_kebab_case: StringResource by lazy { |
||||
StringResource("string:_1_kebab_case", "_1_kebab_case", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 135, 36), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(64_828_505) |
||||
internal val Res.string.app_name: StringResource by lazy { |
||||
StringResource("string:app_name", "app_name", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 207, 44), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(211_426_861) |
||||
internal val Res.string.camelCase: StringResource by lazy { |
||||
StringResource("string:camelCase", "camelCase", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 252, 29), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(466_457_346) |
||||
internal val Res.string.hello: StringResource by lazy { |
||||
StringResource("string:hello", "hello", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 282, 37), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_288_591_563) |
||||
internal val Res.string.`info_using_release_$x`: StringResource by lazy { |
||||
StringResource("string:info_using_release_${'$'}x", "info_using_release_${'$'}x", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 320, 57), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-624_025_575) |
||||
internal val Res.string.multi_line: StringResource by lazy { |
||||
StringResource("string:multi_line", "multi_line", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 378, 178), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_332_636_786) |
||||
internal val Res.string.str_template: StringResource by lazy { |
||||
StringResource("string:str_template", "str_template", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 557, 76), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("PascalCase", Res.string.PascalCase) |
||||
map.put("_1_kebab_case", Res.string._1_kebab_case) |
||||
map.put("app_name", Res.string.app_name) |
||||
map.put("camelCase", Res.string.camelCase) |
||||
map.put("hello", Res.string.hello) |
||||
map.put("info_using_release_${'$'}x", Res.string.`info_using_release_$x`) |
||||
map.put("multi_line", Res.string.multi_line) |
||||
map.put("str_template", Res.string.str_template) |
||||
} |
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal expect val Res.allDrawableResources: Map<String, DrawableResource> |
||||
|
||||
internal expect val Res.allStringResources: Map<String, StringResource> |
||||
|
||||
internal expect val Res.allStringArrayResources: Map<String, StringArrayResource> |
||||
|
||||
internal expect val Res.allPluralStringResources: Map<String, PluralStringResource> |
||||
|
||||
internal expect val Res.allFontResources: Map<String, FontResource> |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
@file:Suppress( |
||||
"RedundantVisibilityModifier", |
||||
"REDUNDANT_VISIBILITY_MODIFIER", |
||||
) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.ByteArray |
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.Suppress |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.getResourceUri |
||||
import org.jetbrains.compose.resources.readResourceBytes |
||||
|
||||
internal object Res { |
||||
/** |
||||
* Reads the content of the resource file at the specified path and returns it as a byte array. |
||||
* |
||||
* Example: `val bytes = Res.readBytes("files/key.bin")` |
||||
* |
||||
* @param path The path of the file to read in the compose resource's directory. |
||||
* @return The content of the file as a byte array. |
||||
*/ |
||||
public suspend fun readBytes(path: String): ByteArray = readResourceBytes("composeResources/app.group.resources_test.generated.resources/" + path) |
||||
|
||||
/** |
||||
* Returns the URI string of the resource file at the specified path. |
||||
* |
||||
* Example: `val uri = Res.getUri("files/key.bin")` |
||||
* |
||||
* @param path The path of the file in the compose resource's directory. |
||||
* @return The URI string of the file. |
||||
*/ |
||||
public fun getUri(path: String): String = getResourceUri("composeResources/app.group.resources_test.generated.resources/" + path) |
||||
|
||||
public object drawable |
||||
|
||||
public object string |
||||
|
||||
public object array |
||||
|
||||
public object plurals |
||||
|
||||
public object font |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(-320_376_586) |
||||
internal val Res.string.desktop_str: StringResource by lazy { |
||||
StringResource("string:desktop_str", "desktop_str", setOf( |
||||
ResourceItem(setOf(), "${MD}values/desktop_strings.desktopMain.cvr", 10, 39), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectDesktopMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("desktop_str", Res.string.desktop_str) |
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal actual val Res.allDrawableResources: Map<String, DrawableResource> by lazy { |
||||
val map = mutableMapOf<String, DrawableResource>() |
||||
_collectCommonMainDrawable0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy { |
||||
val map = mutableMapOf<String, StringResource>() |
||||
_collectDesktopMainString0Resources(map) |
||||
_collectCommonMainString0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy { |
||||
val map = mutableMapOf<String, StringArrayResource>() |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy { |
||||
val map = mutableMapOf<String, PluralStringResource>() |
||||
_collectCommonMainPlurals0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy { |
||||
val map = mutableMapOf<String, FontResource>() |
||||
_collectCommonMainFont0Resources(map) |
||||
return@lazy map |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(50_967_853) |
||||
internal val Res.string.android_str: StringResource by lazy { |
||||
StringResource("string:android_str", "android_str", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.androidMain.cvr", 10, 39), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectAndroidMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("android_str", Res.string.android_str) |
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal actual val Res.allDrawableResources: Map<String, DrawableResource> by lazy { |
||||
val map = mutableMapOf<String, DrawableResource>() |
||||
_collectCommonMainDrawable0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy { |
||||
val map = mutableMapOf<String, StringResource>() |
||||
_collectAndroidMainString0Resources(map) |
||||
_collectCommonMainString0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy { |
||||
val map = mutableMapOf<String, StringArrayResource>() |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy { |
||||
val map = mutableMapOf<String, PluralStringResource>() |
||||
_collectCommonMainPlurals0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy { |
||||
val map = mutableMapOf<String, FontResource>() |
||||
_collectCommonMainFont0Resources(map) |
||||
return@lazy map |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.LanguageQualifier |
||||
import org.jetbrains.compose.resources.RegionQualifier |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.ThemeQualifier |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(1_620_038_668) |
||||
internal val Res.drawable._3_strange_name: DrawableResource by lazy { |
||||
DrawableResource("drawable:_3_strange_name", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/3-strange-name.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(1_620_038_668) |
||||
internal val Res.drawable.camelCaseName: DrawableResource by lazy { |
||||
DrawableResource("drawable:camelCaseName", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/camelCaseName.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(1_620_038_668) |
||||
internal val Res.drawable.`is`: DrawableResource by lazy { |
||||
DrawableResource("drawable:is", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/is.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_131_835_124) |
||||
internal val Res.drawable.vector: DrawableResource by lazy { |
||||
DrawableResource("drawable:vector", setOf( |
||||
ResourceItem(setOf(LanguageQualifier("ast"), ), "${MD}drawable-ast/vector.xml", -1, -1), |
||||
ResourceItem(setOf(LanguageQualifier("au"), RegionQualifier("US"), ), "${MD}drawable-au-rUS/vector.xml", -1, -1), |
||||
ResourceItem(setOf(ThemeQualifier.DARK, LanguageQualifier("ge"), ), "${MD}drawable-dark-ge/vector.xml", -1, -1), |
||||
ResourceItem(setOf(LanguageQualifier("en"), ), "${MD}drawable-en/vector.xml", -1, -1), |
||||
ResourceItem(setOf(), "${MD}drawable/vector.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(1_620_038_668) |
||||
internal val Res.drawable.vector_2: DrawableResource by lazy { |
||||
DrawableResource("drawable:vector_2", setOf( |
||||
ResourceItem(setOf(), "${MD}drawable/vector_2.xml", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainDrawable0Resources(map: MutableMap<String, DrawableResource>) { |
||||
map.put("_3_strange_name", Res.drawable._3_strange_name) |
||||
map.put("camelCaseName", Res.drawable.camelCaseName) |
||||
map.put("is", Res.drawable.`is`) |
||||
map.put("vector", Res.drawable.vector) |
||||
map.put("vector_2", Res.drawable.vector_2) |
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.LanguageQualifier |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(1_893_715_104) |
||||
internal val Res.font.emptyFont: FontResource by lazy { |
||||
FontResource("font:emptyFont", setOf( |
||||
ResourceItem(setOf(LanguageQualifier("en"), ), "${MD}font-en/emptyFont.otf", -1, -1), |
||||
ResourceItem(setOf(), "${MD}font/emptyFont.otf", -1, -1), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainFont0Resources(map: MutableMap<String, FontResource>) { |
||||
map.put("emptyFont", Res.font.emptyFont) |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(-199_361_196) |
||||
internal val Res.plurals.numberOfSongsAvailable: PluralStringResource by lazy { |
||||
PluralStringResource("plurals:numberOfSongsAvailable", "numberOfSongsAvailable", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 10, 124), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainPlurals0Resources(map: MutableMap<String, PluralStringResource>) { |
||||
map.put("numberOfSongsAvailable", Res.plurals.numberOfSongsAvailable) |
||||
} |
||||
@ -0,0 +1,81 @@
@@ -0,0 +1,81 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(405_464_824) |
||||
internal val Res.string.PascalCase: StringResource by lazy { |
||||
StringResource("string:PascalCase", "PascalCase", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 172, 34), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_118_290_776) |
||||
internal val Res.string._1_kebab_case: StringResource by lazy { |
||||
StringResource("string:_1_kebab_case", "_1_kebab_case", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 135, 36), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(64_828_505) |
||||
internal val Res.string.app_name: StringResource by lazy { |
||||
StringResource("string:app_name", "app_name", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 207, 44), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(211_426_861) |
||||
internal val Res.string.camelCase: StringResource by lazy { |
||||
StringResource("string:camelCase", "camelCase", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 252, 29), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(466_457_346) |
||||
internal val Res.string.hello: StringResource by lazy { |
||||
StringResource("string:hello", "hello", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 282, 37), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_288_591_563) |
||||
internal val Res.string.`info_using_release_$x`: StringResource by lazy { |
||||
StringResource("string:info_using_release_${'$'}x", "info_using_release_${'$'}x", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 320, 57), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-624_025_575) |
||||
internal val Res.string.multi_line: StringResource by lazy { |
||||
StringResource("string:multi_line", "multi_line", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 378, 178), |
||||
)) |
||||
} |
||||
|
||||
@delegate:ResourceContentHash(-1_332_636_786) |
||||
internal val Res.string.str_template: StringResource by lazy { |
||||
StringResource("string:str_template", "str_template", setOf( |
||||
ResourceItem(setOf(), "${MD}values/strings.commonMain.cvr", 557, 76), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectCommonMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("PascalCase", Res.string.PascalCase) |
||||
map.put("_1_kebab_case", Res.string._1_kebab_case) |
||||
map.put("app_name", Res.string.app_name) |
||||
map.put("camelCase", Res.string.camelCase) |
||||
map.put("hello", Res.string.hello) |
||||
map.put("info_using_release_${'$'}x", Res.string.`info_using_release_$x`) |
||||
map.put("multi_line", Res.string.multi_line) |
||||
map.put("str_template", Res.string.str_template) |
||||
} |
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal expect val Res.allDrawableResources: Map<String, DrawableResource> |
||||
|
||||
internal expect val Res.allStringResources: Map<String, StringResource> |
||||
|
||||
internal expect val Res.allStringArrayResources: Map<String, StringArrayResource> |
||||
|
||||
internal expect val Res.allPluralStringResources: Map<String, PluralStringResource> |
||||
|
||||
internal expect val Res.allFontResources: Map<String, FontResource> |
||||
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
@file:Suppress( |
||||
"RedundantVisibilityModifier", |
||||
"REDUNDANT_VISIBILITY_MODIFIER", |
||||
) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.ByteArray |
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.Suppress |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.getResourceUri |
||||
import org.jetbrains.compose.resources.readResourceBytes |
||||
|
||||
internal object Res { |
||||
/** |
||||
* Reads the content of the resource file at the specified path and returns it as a byte array. |
||||
* |
||||
* Example: `val bytes = Res.readBytes("files/key.bin")` |
||||
* |
||||
* @param path The path of the file to read in the compose resource's directory. |
||||
* @return The content of the file as a byte array. |
||||
*/ |
||||
public suspend fun readBytes(path: String): ByteArray = readResourceBytes("composeResources/app.group.resources_test.generated.resources/" + path) |
||||
|
||||
/** |
||||
* Returns the URI string of the resource file at the specified path. |
||||
* |
||||
* Example: `val uri = Res.getUri("files/key.bin")` |
||||
* |
||||
* @param path The path of the file in the compose resource's directory. |
||||
* @return The URI string of the file. |
||||
*/ |
||||
public fun getUri(path: String): String = getResourceUri("composeResources/app.group.resources_test.generated.resources/" + path) |
||||
|
||||
public object drawable |
||||
|
||||
public object string |
||||
|
||||
public object array |
||||
|
||||
public object plurals |
||||
|
||||
public object font |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
@file:OptIn(InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.MutableMap |
||||
import org.jetbrains.compose.resources.InternalResourceApi |
||||
import org.jetbrains.compose.resources.ResourceContentHash |
||||
import org.jetbrains.compose.resources.ResourceItem |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
private const val MD: String = "composeResources/app.group.resources_test.generated.resources/" |
||||
|
||||
@delegate:ResourceContentHash(-320_376_586) |
||||
internal val Res.string.desktop_str: StringResource by lazy { |
||||
StringResource("string:desktop_str", "desktop_str", setOf( |
||||
ResourceItem(setOf(), "${MD}values/desktop_strings.desktopMain.cvr", 10, 39), |
||||
)) |
||||
} |
||||
|
||||
@InternalResourceApi |
||||
internal fun _collectDesktopMainString0Resources(map: MutableMap<String, StringResource>) { |
||||
map.put("desktop_str", Res.string.desktop_str) |
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) |
||||
|
||||
package app.group.resources_test.generated.resources |
||||
|
||||
import kotlin.OptIn |
||||
import kotlin.String |
||||
import kotlin.collections.Map |
||||
import org.jetbrains.compose.resources.DrawableResource |
||||
import org.jetbrains.compose.resources.FontResource |
||||
import org.jetbrains.compose.resources.PluralStringResource |
||||
import org.jetbrains.compose.resources.StringArrayResource |
||||
import org.jetbrains.compose.resources.StringResource |
||||
|
||||
internal actual val Res.allDrawableResources: Map<String, DrawableResource> by lazy { |
||||
val map = mutableMapOf<String, DrawableResource>() |
||||
_collectCommonMainDrawable0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy { |
||||
val map = mutableMapOf<String, StringResource>() |
||||
_collectDesktopMainString0Resources(map) |
||||
_collectCommonMainString0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy { |
||||
val map = mutableMapOf<String, StringArrayResource>() |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy { |
||||
val map = mutableMapOf<String, PluralStringResource>() |
||||
_collectCommonMainPlurals0Resources(map) |
||||
return@lazy map |
||||
} |
||||
|
||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy { |
||||
val map = mutableMapOf<String, FontResource>() |
||||
_collectCommonMainFont0Resources(map) |
||||
return@lazy map |
||||
} |
||||
Loading…
Reference in new issue