Konstantin Tskhovrebov 7 months ago
parent
commit
c25262d490
  1. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/PrepareComposeResources.kt
  2. 4
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/ResourcesTest.kt

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

@ -69,6 +69,7 @@ internal abstract class CopyNonXmlValueResourcesTask : DefaultTask() {
@get:InputFiles @get:InputFiles
@get:SkipWhenEmpty @get:SkipWhenEmpty
@get:IgnoreEmptyDirectories
val realInputFiles = originalResourcesDir.map { dir -> val realInputFiles = originalResourcesDir.map { dir ->
dir.asFileTree.matching { it.exclude("values*/*.xml") } dir.asFileTree.matching { it.exclude("values*/*.xml") }
} }
@ -97,10 +98,12 @@ internal abstract class CopyNonXmlValueResourcesTask : DefaultTask() {
internal abstract class PrepareComposeResourcesTask : DefaultTask() { internal abstract class PrepareComposeResourcesTask : DefaultTask() {
@get:InputFiles @get:InputFiles
@get:SkipWhenEmpty @get:SkipWhenEmpty
@get:IgnoreEmptyDirectories
abstract val convertedXmls: Property<FileTree> abstract val convertedXmls: Property<FileTree>
@get:InputFiles @get:InputFiles
@get:SkipWhenEmpty @get:SkipWhenEmpty
@get:IgnoreEmptyDirectories
abstract val copiedNonXmls: Property<FileTree> abstract val copiedNonXmls: Property<FileTree>
@get:OutputDirectory @get:OutputDirectory
@ -146,6 +149,7 @@ internal abstract class XmlValuesConverterTask : DefaultTask() {
@get:InputFiles @get:InputFiles
@get:SkipWhenEmpty @get:SkipWhenEmpty
@get:IgnoreEmptyDirectories
val realInputFiles = originalResourcesDir.map { dir -> val realInputFiles = originalResourcesDir.map { dir ->
dir.asFileTree.matching { it.include("values*/*.xml") } dir.asFileTree.matching { it.include("values*/*.xml") }
} }

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

@ -584,7 +584,7 @@ class ResourcesTest : GradlePluginTestBase() {
check.taskSkipped(":syncPodComposeResourcesForIos") check.taskSkipped(":syncPodComposeResourcesForIos")
} }
gradle(":syncPodComposeResourcesForIos").checks { gradle(":syncPodComposeResourcesForIos").checks {
check.taskSuccessful(":convertXmlValueResourcesForCommonMain") check.taskNoSource(":convertXmlValueResourcesForCommonMain")
check.taskSuccessful(":copyNonXmlValueResourcesForCommonMain") check.taskSuccessful(":copyNonXmlValueResourcesForCommonMain")
check.taskSuccessful(":prepareComposeResourcesTaskForCommonMain") check.taskSuccessful(":prepareComposeResourcesTaskForCommonMain")
check.taskSkipped(":generateResourceAccessorsForCommonMain") check.taskSkipped(":generateResourceAccessorsForCommonMain")
@ -599,7 +599,7 @@ class ResourcesTest : GradlePluginTestBase() {
check.taskNoSource(":prepareComposeResourcesTaskForAppleMain") check.taskNoSource(":prepareComposeResourcesTaskForAppleMain")
check.taskSkipped(":generateResourceAccessorsForAppleMain") check.taskSkipped(":generateResourceAccessorsForAppleMain")
check.taskSuccessful(":convertXmlValueResourcesForIosMain") check.taskNoSource(":convertXmlValueResourcesForIosMain")
check.taskSuccessful(":copyNonXmlValueResourcesForIosMain") check.taskSuccessful(":copyNonXmlValueResourcesForIosMain")
check.taskSuccessful(":prepareComposeResourcesTaskForIosMain") check.taskSuccessful(":prepareComposeResourcesTaskForIosMain")
check.taskSkipped(":generateResourceAccessorsForIosMain") check.taskSkipped(":generateResourceAccessorsForIosMain")

Loading…
Cancel
Save