Skip to content

Commit

Permalink
[gradle] Update test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Jul 5, 2024
1 parent a8666a9 commit 255b961
Show file tree
Hide file tree
Showing 28 changed files with 860 additions and 350 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@ class ResourcesTest : GradlePluginTestBase() {

@Test
fun testEmptyResClass(): Unit = with(testProject("misc/emptyResources")) {
gradle("generateComposeResClass").checks {
gradle("prepareKotlinIdeaImport").checks {
assertDirectoriesContentEquals(
file("build/generated/compose/resourceGenerator/kotlin/commonResClass/app/group/empty_res/generated/resources"),
file("build/generated/compose/resourceGenerator/kotlin"),
file("expected")
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@
package my.lib.res

import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.InternalResourceApi
import org.jetbrains.compose.resources.StringResource

private object AndroidMainString0 {
public val android_str: StringResource by
lazy { init_android_str() }
public val android_str: StringResource by
lazy { init_android_str() }
}

@InternalResourceApi
internal fun _collectAndroidMainString0Resources(map: MutableMap<String, StringResource>) {
map.put("android_str", AndroidMainString0.android_str)
}

public val Res.string.android_str: StringResource
get() = AndroidMainString0.android_str
get() = AndroidMainString0.android_str

private fun init_android_str(): StringResource = org.jetbrains.compose.resources.StringResource(
"string:android_str", "android_str",
"string:android_str", "android_str",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/values/strings.androidMain.cvr", 10, 39),
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/values/strings.androidMain.cvr", 10, 39),
)
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class)

package my.lib.res

import kotlin.OptIn
import kotlin.String
import kotlin.collections.Map
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.FontResource
import org.jetbrains.compose.resources.PluralStringResource
import org.jetbrains.compose.resources.StringArrayResource
import org.jetbrains.compose.resources.StringResource

@ExperimentalResourceApi
public actual val Res.allDrawableResources: Map<String, DrawableResource> by lazy {
val map = mutableMapOf<String, DrawableResource>()
_collectCommonMainDrawable0Resources(map)
return@lazy map
}


@ExperimentalResourceApi
public actual val Res.allStringResources: Map<String, StringResource> by lazy {
val map = mutableMapOf<String, StringResource>()
_collectAndroidMainString0Resources(map)
_collectCommonMainString0Resources(map)
return@lazy map
}


@ExperimentalResourceApi
public actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy {
val map = mutableMapOf<String, StringArrayResource>()
return@lazy map
}


@ExperimentalResourceApi
public actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy {
val map = mutableMapOf<String, PluralStringResource>()
_collectCommonMainPlurals0Resources(map)
return@lazy map
}


@ExperimentalResourceApi
public actual val Res.allFontResources: Map<String, FontResource> by lazy {
val map = mutableMapOf<String, FontResource>()
_collectCommonMainFont0Resources(map)
return@lazy map
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,92 +3,104 @@
package my.lib.res

import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.InternalResourceApi

private object CommonMainDrawable0 {
public val _3_strange_name: DrawableResource by
lazy { init__3_strange_name() }
public val _3_strange_name: DrawableResource by
lazy { init__3_strange_name() }

public val camelCaseName: DrawableResource by
lazy { init_camelCaseName() }
public val camelCaseName: DrawableResource by
lazy { init_camelCaseName() }

public val `is`: DrawableResource by
lazy { init_is() }
public val `is`: DrawableResource by
lazy { init_is() }

public val vector: DrawableResource by
lazy { init_vector() }
public val vector: DrawableResource by
lazy { init_vector() }

public val vector_2: DrawableResource by
lazy { init_vector_2() }
public val vector_2: DrawableResource by
lazy { init_vector_2() }
}

@InternalResourceApi
internal fun _collectCommonMainDrawable0Resources(map: MutableMap<String, DrawableResource>) {
map.put("_3_strange_name", CommonMainDrawable0._3_strange_name)
map.put("camelCaseName", CommonMainDrawable0.camelCaseName)
map.put("is", CommonMainDrawable0.`is`)
map.put("vector", CommonMainDrawable0.vector)
map.put("vector_2", CommonMainDrawable0.vector_2)
}

public val Res.drawable._3_strange_name: DrawableResource
get() = CommonMainDrawable0._3_strange_name

private fun init__3_strange_name(): DrawableResource =
org.jetbrains.compose.resources.DrawableResource(
"drawable:_3_strange_name",
org.jetbrains.compose.resources.DrawableResource(
"drawable:_3_strange_name",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/3-strange-name.xml", -1, -1),
"composeResources/my.lib.res/drawable/3-strange-name.xml", -1, -1),
)
)
)

public val Res.drawable.camelCaseName: DrawableResource
get() = CommonMainDrawable0.camelCaseName

private fun init_camelCaseName(): DrawableResource =
org.jetbrains.compose.resources.DrawableResource(
"drawable:camelCaseName",
org.jetbrains.compose.resources.DrawableResource(
"drawable:camelCaseName",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/camelCaseName.xml", -1, -1),
"composeResources/my.lib.res/drawable/camelCaseName.xml", -1, -1),
)
)
)

public val Res.drawable.`is`: DrawableResource
get() = CommonMainDrawable0.`is`

private fun init_is(): DrawableResource = org.jetbrains.compose.resources.DrawableResource(
"drawable:is",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/is.xml", -1, -1),
)
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/is.xml", -1, -1),
)
)

public val Res.drawable.vector: DrawableResource
get() = CommonMainDrawable0.vector

private fun init_vector(): DrawableResource = org.jetbrains.compose.resources.DrawableResource(
"drawable:vector",
setOf(

setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(org.jetbrains.compose.resources.LanguageQualifier("ast"),
), "composeResources/my.lib.res/drawable-ast/vector.xml", -1, -1),

org.jetbrains.compose.resources.ResourceItem(setOf(org.jetbrains.compose.resources.LanguageQualifier("au"),
org.jetbrains.compose.resources.RegionQualifier("US"), ),
"composeResources/my.lib.res/drawable-au-rUS/vector.xml", -1, -1),

org.jetbrains.compose.resources.RegionQualifier("US"), ),
"composeResources/my.lib.res/drawable-au-rUS/vector.xml", -1, -1),
org.jetbrains.compose.resources.ResourceItem(setOf(org.jetbrains.compose.resources.ThemeQualifier.DARK,
org.jetbrains.compose.resources.LanguageQualifier("ge"), ),
"composeResources/my.lib.res/drawable-dark-ge/vector.xml", -1, -1),

org.jetbrains.compose.resources.LanguageQualifier("ge"), ),
"composeResources/my.lib.res/drawable-dark-ge/vector.xml", -1, -1),
org.jetbrains.compose.resources.ResourceItem(setOf(org.jetbrains.compose.resources.LanguageQualifier("en"),
), "composeResources/my.lib.res/drawable-en/vector.xml", -1, -1),
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/vector.xml", -1, -1),
)
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/vector.xml", -1, -1),
)
)

public val Res.drawable.vector_2: DrawableResource
get() = CommonMainDrawable0.vector_2

private fun init_vector_2(): DrawableResource = org.jetbrains.compose.resources.DrawableResource(
"drawable:vector_2",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/vector_2.xml", -1, -1),
)
)
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/drawable/vector_2.xml", -1, -1),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,31 @@
package my.lib.res

import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.FontResource
import org.jetbrains.compose.resources.InternalResourceApi

private object CommonMainFont0 {
public val emptyFont: FontResource by
lazy { init_emptyFont() }
public val emptyFont: FontResource by
lazy { init_emptyFont() }
}

@InternalResourceApi
internal fun _collectCommonMainFont0Resources(map: MutableMap<String, FontResource>) {
map.put("emptyFont", CommonMainFont0.emptyFont)
}

public val Res.font.emptyFont: FontResource
get() = CommonMainFont0.emptyFont

private fun init_emptyFont(): FontResource = org.jetbrains.compose.resources.FontResource(
"font:emptyFont",
setOf(

setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(org.jetbrains.compose.resources.LanguageQualifier("en"),
), "composeResources/my.lib.res/font-en/emptyFont.otf", -1, -1),
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/font/emptyFont.otf", -1, -1),
)
)
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/font/emptyFont.otf", -1, -1),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,29 @@
package my.lib.res

import kotlin.OptIn
import kotlin.String
import kotlin.collections.MutableMap
import org.jetbrains.compose.resources.InternalResourceApi
import org.jetbrains.compose.resources.PluralStringResource

private object CommonMainPlurals0 {
public val numberOfSongsAvailable: PluralStringResource by
lazy { init_numberOfSongsAvailable() }
public val numberOfSongsAvailable: PluralStringResource by
lazy { init_numberOfSongsAvailable() }
}

@InternalResourceApi
internal fun _collectCommonMainPlurals0Resources(map: MutableMap<String, PluralStringResource>) {
map.put("numberOfSongsAvailable", CommonMainPlurals0.numberOfSongsAvailable)
}

public val Res.plurals.numberOfSongsAvailable: PluralStringResource
get() = CommonMainPlurals0.numberOfSongsAvailable
get() = CommonMainPlurals0.numberOfSongsAvailable

private fun init_numberOfSongsAvailable(): PluralStringResource =
org.jetbrains.compose.resources.PluralStringResource(
"plurals:numberOfSongsAvailable", "numberOfSongsAvailable",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/values/strings.commonMain.cvr", 10, 124),
)
)
"plurals:numberOfSongsAvailable", "numberOfSongsAvailable",
setOf(
org.jetbrains.compose.resources.ResourceItem(setOf(),
"composeResources/my.lib.res/values/strings.commonMain.cvr", 10, 124),
)
)
Loading

0 comments on commit 255b961

Please sign in to comment.