Browse Source

Introduce top level composeResources dir (#4127)

pull/4144/head
Konstantin 10 months ago committed by GitHub
parent
commit
747aab02f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 0
      components/resources/demo/shared/src/commonMain/composeResources/drawable/compose.png
  2. 0
      components/resources/demo/shared/src/commonMain/composeResources/drawable/droid_icon.xml
  3. 0
      components/resources/demo/shared/src/commonMain/composeResources/drawable/insta_icon.xml
  4. 0
      components/resources/demo/shared/src/commonMain/composeResources/drawable/land.webp
  5. 0
      components/resources/demo/shared/src/commonMain/composeResources/files/icon.xml
  6. 0
      components/resources/demo/shared/src/commonMain/composeResources/font/font_awesome.otf
  7. 0
      components/resources/demo/shared/src/commonMain/composeResources/values/strings.xml
  8. 2
      components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/FileRes.kt
  9. 2
      components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/FontRes.kt
  10. 2
      components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/ImagesRes.kt
  11. 2
      components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/StringRes.kt
  12. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
  13. 113
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt
  14. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt
  15. 48
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/ResourcesTest.kt
  16. 29
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/expected/Res.kt
  17. 1
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/settings.gradle.kts
  18. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-au-rUS/vector.xml
  19. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-dark-ge/vector.xml
  20. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-en/vector.xml
  21. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/3-strange-name.xml
  22. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/vector.xml
  23. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/vector_2.xml
  24. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/files/file.txt
  25. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/font/emptyFont.otf
  26. 0
      gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/values/strings.xml

0
components/resources/demo/shared/src/commonMain/resources/composeResources/drawable/compose.png → components/resources/demo/shared/src/commonMain/composeResources/drawable/compose.png

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

0
components/resources/demo/shared/src/commonMain/resources/composeResources/drawable/droid_icon.xml → components/resources/demo/shared/src/commonMain/composeResources/drawable/droid_icon.xml

0
components/resources/demo/shared/src/commonMain/resources/composeResources/drawable/insta_icon.xml → components/resources/demo/shared/src/commonMain/composeResources/drawable/insta_icon.xml

0
components/resources/demo/shared/src/commonMain/resources/composeResources/drawable/land.webp → components/resources/demo/shared/src/commonMain/composeResources/drawable/land.webp

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
components/resources/demo/shared/src/commonMain/resources/composeResources/files/icon.xml → components/resources/demo/shared/src/commonMain/composeResources/files/icon.xml

0
components/resources/demo/shared/src/commonMain/resources/composeResources/font/font_awesome.otf → components/resources/demo/shared/src/commonMain/composeResources/font/font_awesome.otf

0
components/resources/demo/shared/src/commonMain/resources/composeResources/values/strings.xml → components/resources/demo/shared/src/commonMain/composeResources/values/strings.xml

2
components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/FileRes.kt

@ -19,7 +19,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import components.resources.demo.generated.resources.Res import components.resources.demo.shared.generated.resources.Res
@Composable @Composable
fun FileRes(paddingValues: PaddingValues) { fun FileRes(paddingValues: PaddingValues) {

2
components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/FontRes.kt

@ -13,7 +13,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import components.resources.demo.generated.resources.Res import components.resources.demo.shared.generated.resources.Res
import org.jetbrains.compose.resources.Font import org.jetbrains.compose.resources.Font
@Composable @Composable

2
components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/ImagesRes.kt

@ -11,7 +11,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import components.resources.demo.generated.resources.Res import components.resources.demo.shared.generated.resources.Res
import org.jetbrains.compose.resources.imageResource import org.jetbrains.compose.resources.imageResource
import org.jetbrains.compose.resources.vectorResource import org.jetbrains.compose.resources.vectorResource
import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.painterResource

2
components/resources/demo/shared/src/commonMain/kotlin/org/jetbrains/compose/resources/demo/shared/StringRes.kt

@ -21,7 +21,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import components.resources.demo.generated.resources.Res import components.resources.demo.shared.generated.resources.Res
import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.stringResource
import org.jetbrains.compose.resources.stringArrayResource import org.jetbrains.compose.resources.stringArrayResource
import org.jetbrains.compose.resources.readResourceBytes import org.jetbrains.compose.resources.readResourceBytes

4
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt

@ -28,7 +28,7 @@ import org.jetbrains.compose.internal.mppExtOrNull
import org.jetbrains.compose.internal.service.ConfigurationProblemReporterService import org.jetbrains.compose.internal.service.ConfigurationProblemReporterService
import org.jetbrains.compose.internal.service.GradlePropertySnapshotService import org.jetbrains.compose.internal.service.GradlePropertySnapshotService
import org.jetbrains.compose.internal.utils.currentTarget import org.jetbrains.compose.internal.utils.currentTarget
import org.jetbrains.compose.resources.configureResourceGenerator import org.jetbrains.compose.resources.configureComposeResources
import org.jetbrains.compose.resources.ios.configureSyncTask import org.jetbrains.compose.resources.ios.configureSyncTask
import org.jetbrains.compose.web.WebExtension import org.jetbrains.compose.web.WebExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
@ -65,7 +65,7 @@ abstract class ComposePlugin : Plugin<Project> {
project.plugins.apply(ComposeCompilerKotlinSupportPlugin::class.java) project.plugins.apply(ComposeCompilerKotlinSupportPlugin::class.java)
project.configureNativeCompilerCaching() project.configureNativeCompilerCaching()
project.configureResourceGenerator() project.configureComposeResources()
project.afterEvaluate { project.afterEvaluate {
configureDesktop(project, desktopExtension) configureDesktop(project, desktopExtension)

113
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt

@ -2,79 +2,86 @@ package org.jetbrains.compose.resources
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.provider.Provider import org.gradle.api.provider.Provider
import org.jetbrains.compose.ComposeExtension
import org.jetbrains.compose.ComposePlugin import org.jetbrains.compose.ComposePlugin
import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.compose.desktop.application.internal.ComposeProperties import org.jetbrains.compose.desktop.application.internal.ComposeProperties
import org.jetbrains.compose.internal.KOTLIN_MPP_PLUGIN_ID import org.jetbrains.compose.internal.KOTLIN_MPP_PLUGIN_ID
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import java.io.File import java.io.File
internal const val COMPOSE_RESOURCES_DIR = "composeResources" internal const val COMPOSE_RESOURCES_DIR = "composeResources"
private const val RES_GEN_DIR = "generated/compose/resourceGenerator" private const val RES_GEN_DIR = "generated/compose/resourceGenerator"
internal fun Project.configureResourceGenerator() { internal fun Project.configureComposeResources() {
pluginManager.withPlugin(KOTLIN_MPP_PLUGIN_ID) { pluginManager.withPlugin(KOTLIN_MPP_PLUGIN_ID) {
val kotlinExtension = project.extensions.getByType(KotlinProjectExtension::class.java) val kotlinExtension = project.extensions.getByType(KotlinMultiplatformExtension::class.java)
val commonSourceSet = kotlinExtension.sourceSets.findByName(KotlinSourceSet.COMMON_MAIN_SOURCE_SET_NAME) ?: return@withPlugin kotlinExtension.sourceSets.all { sourceSet ->
val commonResourcesDir = provider { commonSourceSet.resources.sourceDirectories.first() } val sourceSetName = sourceSet.name
val composeResourcesPath = project.projectDir.resolve("src/$sourceSetName/$COMPOSE_RESOURCES_DIR")
val packageName = provider { sourceSet.resources.srcDirs(composeResourcesPath)
buildString { if (sourceSetName == KotlinSourceSet.COMMON_MAIN_SOURCE_SET_NAME) {
val group = project.group.toString().asUnderscoredIdentifier() configureResourceGenerator(composeResourcesPath, sourceSet)
append(group)
if (group.isNotEmpty()) append(".")
append("generated.resources")
} }
} }
}
}
fun buildDir(path: String) = layout.dir(layout.buildDirectory.map { File(it.asFile, path) }) private fun Project.configureResourceGenerator(commonComposeResourcesDir: File, commonSourceSet: KotlinSourceSet) {
val commonComposeResources = provider { commonComposeResourcesDir }
val packageName = provider {
buildString {
val group = project.group.toString().asUnderscoredIdentifier()
append(group)
if (group.isNotEmpty()) append(".")
append(project.name.lowercase())
append(".generated.resources")
}
}
val resDir = layout.dir(commonResourcesDir.map { it.resolve(COMPOSE_RESOURCES_DIR) }) fun buildDir(path: String) = layout.dir(layout.buildDirectory.map { File(it.asFile, path) })
//lazy check a dependency on the Resources library val resDir = layout.dir(commonComposeResources)
val shouldGenerateResourceAccessors: Provider<Boolean> = provider {
if (ComposeProperties.alwaysGenerateResourceAccessors(providers).get()) {
true
} else {
configurations
.getByName(commonSourceSet.implementationConfigurationName)
.allDependencies.any { dep ->
val depStringNotation = dep.let { "${it.group}:${it.name}:${it.version}" }
depStringNotation == ComposePlugin.CommonComponentsDependencies.resources
}
}
}
val genTask = tasks.register( //lazy check a dependency on the Resources library
"generateComposeResClass", val shouldGenerateResourceAccessors: Provider<Boolean> = provider {
GenerateResClassTask::class.java if (ComposeProperties.alwaysGenerateResourceAccessors(providers).get()) {
) { true
it.packageName.set(packageName) } else {
it.resDir.set(resDir) configurations
it.codeDir.set(buildDir("$RES_GEN_DIR/kotlin")) .getByName(commonSourceSet.implementationConfigurationName)
it.onlyIf { shouldGenerateResourceAccessors.get() } .allDependencies.any { dep ->
val depStringNotation = dep.let { "${it.group}:${it.name}:${it.version}" }
depStringNotation == ComposePlugin.CommonComponentsDependencies.resources
}
} }
}
//register generated source set val genTask = tasks.register(
commonSourceSet.kotlin.srcDir(genTask.map { it.codeDir }) "generateComposeResClass",
GenerateResClassTask::class.java
) {
it.packageName.set(packageName)
it.resDir.set(resDir)
it.codeDir.set(buildDir("$RES_GEN_DIR/kotlin"))
it.onlyIf { shouldGenerateResourceAccessors.get() }
}
//setup task execution during IDE import //register generated source set
tasks.configureEach { commonSourceSet.kotlin.srcDir(genTask.map { it.codeDir })
if (it.name == "prepareKotlinIdeaImport") {
it.dependsOn(genTask)
}
}
val androidExtension = project.extensions.findByName("android") //setup task execution during IDE import
if (androidExtension != null) { tasks.configureEach {
configureAndroidResources( if (it.name == "prepareKotlinIdeaImport") {
commonResourcesDir, it.dependsOn(genTask)
buildDir("$RES_GEN_DIR/androidFonts").map { it.asFile },
shouldGenerateResourceAccessors
)
} }
} }
}
val androidExtension = project.extensions.findByName("android")
if (androidExtension != null) {
configureAndroidResources(
commonComposeResources,
buildDir("$RES_GEN_DIR/androidFonts").map { it.asFile },
shouldGenerateResourceAccessors
)
}
}

4
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt

@ -125,7 +125,7 @@ internal fun getResFileSpec(
.addParameter("path", String::class) .addParameter("path", String::class)
.addModifiers(KModifier.SUSPEND) .addModifiers(KModifier.SUSPEND)
.returns(ByteArray::class) .returns(ByteArray::class)
.addStatement("return %M(\"$COMPOSE_RESOURCES_DIR/\" + path)", readResourceBytes) //todo: add module ID here .addStatement("return %M(path)", readResourceBytes) //todo: add module ID here
.build() .build()
) )
@ -163,7 +163,7 @@ private fun TypeSpec.Builder.addResourceProperty(name: String, items: List<Resou
add("%T(\n", resourceItemClass).withIndent { add("%T(\n", resourceItemClass).withIndent {
add("setOf(").addQualifiers(item).add("),\n") add("setOf(").addQualifiers(item).add("),\n")
//file separator should be '/' on all platforms //file separator should be '/' on all platforms
add("\"$COMPOSE_RESOURCES_DIR/${item.path.invariantSeparatorsPathString}\"\n") //todo: add module ID here add("\"${item.path.invariantSeparatorsPathString}\"\n") //todo: add module ID here
} }
add("),\n") add("),\n")
} }

48
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/ResourcesTest.kt

@ -13,24 +13,24 @@ class ResourcesTest : GradlePluginTestBase() {
//check generated resource's accessors //check generated resource's accessors
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
assertEqualTextFiles( assertEqualTextFiles(
file("build/generated/compose/resourceGenerator/kotlin/app/group/generated/resources/Res.kt"), file("build/generated/compose/resourceGenerator/kotlin/app/group/resources_test/generated/resources/Res.kt"),
file("expected/Res.kt") file("expected/Res.kt")
) )
} }
//check resource's accessors were regenerated //check resource's accessors were regenerated
file("src/commonMain/resources/composeResources/drawable/vector_2.xml").renameTo( file("src/commonMain/composeResources/drawable/vector_2.xml").renameTo(
file("src/commonMain/resources/composeResources/drawable/vector_3.xml") file("src/commonMain/composeResources/drawable/vector_3.xml")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
assertNotEqualTextFiles( assertNotEqualTextFiles(
file("build/generated/compose/resourceGenerator/kotlin/app/group/generated/resources/Res.kt"), file("build/generated/compose/resourceGenerator/kotlin/app/group/resources_test/generated/resources/Res.kt"),
file("expected/Res.kt") file("expected/Res.kt")
) )
} }
file("src/commonMain/resources/composeResources/drawable-en").renameTo( file("src/commonMain/composeResources/drawable-en").renameTo(
file("src/commonMain/resources/composeResources/drawable-ren") file("src/commonMain/composeResources/drawable-ren")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -38,8 +38,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/drawable-ren").renameTo( file("src/commonMain/composeResources/drawable-ren").renameTo(
file("src/commonMain/resources/composeResources/drawable-rUS-en") file("src/commonMain/composeResources/drawable-rUS-en")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -47,8 +47,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/drawable-rUS-en").renameTo( file("src/commonMain/composeResources/drawable-rUS-en").renameTo(
file("src/commonMain/resources/composeResources/drawable-rUS") file("src/commonMain/composeResources/drawable-rUS")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -56,8 +56,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/drawable-rUS").renameTo( file("src/commonMain/composeResources/drawable-rUS").renameTo(
file("src/commonMain/resources/composeResources/drawable-en-fr") file("src/commonMain/composeResources/drawable-en-fr")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -65,8 +65,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/drawable-en-fr").renameTo( file("src/commonMain/composeResources/drawable-en-fr").renameTo(
file("src/commonMain/resources/composeResources/image") file("src/commonMain/composeResources/image")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -74,8 +74,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/image").renameTo( file("src/commonMain/composeResources/image").renameTo(
file("src/commonMain/resources/composeResources/files-de") file("src/commonMain/composeResources/files-de")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -83,8 +83,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/files-de").renameTo( file("src/commonMain/composeResources/files-de").renameTo(
file("src/commonMain/resources/composeResources/strings") file("src/commonMain/composeResources/strings")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -92,8 +92,8 @@ class ResourcesTest : GradlePluginTestBase() {
""".trimIndent()) """.trimIndent())
} }
file("src/commonMain/resources/composeResources/strings").renameTo( file("src/commonMain/composeResources/strings").renameTo(
file("src/commonMain/resources/composeResources/string-us") file("src/commonMain/composeResources/string-us")
) )
gradle("generateComposeResClass").checks { gradle("generateComposeResClass").checks {
check.logContains(""" check.logContains("""
@ -102,11 +102,11 @@ class ResourcesTest : GradlePluginTestBase() {
} }
//restore defaults //restore defaults
file("src/commonMain/resources/composeResources/string-us").renameTo( file("src/commonMain/composeResources/string-us").renameTo(
file("src/commonMain/resources/composeResources/drawable-en") file("src/commonMain/composeResources/drawable-en")
) )
file("src/commonMain/resources/composeResources/drawable/vector_3.xml").renameTo( file("src/commonMain/composeResources/drawable/vector_3.xml").renameTo(
file("src/commonMain/resources/composeResources/drawable/vector_2.xml") file("src/commonMain/composeResources/drawable/vector_2.xml")
) )
//TODO: check a real build after a release a new version of the resources library //TODO: check a real build after a release a new version of the resources library

29
gradle-plugins/compose/src/test/test-projects/misc/commonResources/expected/Res.kt

@ -1,4 +1,4 @@
package app.group.generated.resources package app.group.resources_test.generated.resources
import kotlin.ByteArray import kotlin.ByteArray
import kotlin.OptIn import kotlin.OptIn
@ -22,8 +22,7 @@ internal object Res {
* @return The content of the file as a byte array. * @return The content of the file as a byte array.
*/ */
@OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) @OptIn(org.jetbrains.compose.resources.InternalResourceApi::class)
public suspend fun readBytes(path: String): ByteArray = readResourceBytes("composeResources/" + public suspend fun readBytes(path: String): ByteArray = readResourceBytes(path)
path)
public object drawable { public object drawable {
public val _3_strange_name: DrawableResource = DrawableResource( public val _3_strange_name: DrawableResource = DrawableResource(
@ -31,7 +30,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/drawable/3-strange-name.xml" "drawable/3-strange-name.xml"
), ),
) )
) )
@ -41,19 +40,19 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(LanguageQualifier("au"), RegionQualifier("US"), ), setOf(LanguageQualifier("au"), RegionQualifier("US"), ),
"composeResources/drawable-au-rUS/vector.xml" "drawable-au-rUS/vector.xml"
), ),
ResourceItem( ResourceItem(
setOf(ThemeQualifier.DARK, LanguageQualifier("ge"), ), setOf(ThemeQualifier.DARK, LanguageQualifier("ge"), ),
"composeResources/drawable-dark-ge/vector.xml" "drawable-dark-ge/vector.xml"
), ),
ResourceItem( ResourceItem(
setOf(LanguageQualifier("en"), ), setOf(LanguageQualifier("en"), ),
"composeResources/drawable-en/vector.xml" "drawable-en/vector.xml"
), ),
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/drawable/vector.xml" "drawable/vector.xml"
), ),
) )
) )
@ -63,7 +62,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/drawable/vector_2.xml" "drawable/vector_2.xml"
), ),
) )
) )
@ -75,7 +74,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/font/emptyFont.otf" "font/emptyFont.otf"
), ),
) )
) )
@ -88,7 +87,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/values/strings.xml" "values/strings.xml"
), ),
) )
) )
@ -99,7 +98,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/values/strings.xml" "values/strings.xml"
), ),
) )
) )
@ -110,7 +109,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/values/strings.xml" "values/strings.xml"
), ),
) )
) )
@ -121,7 +120,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/values/strings.xml" "values/strings.xml"
), ),
) )
) )
@ -132,7 +131,7 @@ internal object Res {
setOf( setOf(
ResourceItem( ResourceItem(
setOf(), setOf(),
"composeResources/values/strings.xml" "values/strings.xml"
), ),
) )
) )

1
gradle-plugins/compose/src/test/test-projects/misc/commonResources/settings.gradle.kts

@ -1,3 +1,4 @@
rootProject.name = "resources_test"
pluginManagement { pluginManagement {
repositories { repositories {
mavenLocal() mavenLocal()

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable-au-rUS/vector.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-au-rUS/vector.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable-dark-ge/vector.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-dark-ge/vector.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable-en/vector.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable-en/vector.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable/3-strange-name.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/3-strange-name.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable/vector.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/vector.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/drawable/vector_2.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/drawable/vector_2.xml

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/files/file.txt → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/files/file.txt

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/font/emptyFont.otf → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/font/emptyFont.otf

0
gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/resources/composeResources/values/strings.xml → gradle-plugins/compose/src/test/test-projects/misc/commonResources/src/commonMain/composeResources/values/strings.xml

Loading…
Cancel
Save