JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.02k stars 1.1k forks source link

Request for ability to opt-out of resource tasks added in latest compose plugin (1.6.10-rc03) #4822

Closed bitspittle closed 1 week ago

bitspittle commented 2 weeks ago

I'm using Compose HTML, and it seems like the most recent version of Compose added a ton of resource accessor tasks which I don't need. This seems to have been created for CMP for Web, but it's significantly cluttering our output (with 10+ no-op tasks per module):

Task :site:generateResourceAccessorsForCommonMain NO-SOURCE Task :site:generateResourceAccessorsForJsMain NO-SOURCE Task :site:convertXmlValueResourcesForJvmMain NO-SOURCE Task :site:copyNonXmlValueResourcesForJvmMain NO-SOURCE Task :site:prepareComposeResourcesTaskForJvmMain NO-SOURCE Task :site:generateResourceAccessorsForJvmMain NO-SOURCE Task :sitelib:convertXmlValueResourcesForJvmMain NO-SOURCE Task :sitelib:copyNonXmlValueResourcesForJvmMain NO-SOURCE Task :sitelib:prepareComposeResourcesTaskForJvmMain NO-SOURCE

terrakok commented 2 weeks ago

At the moment the Compose resources is a inseparable part of the Compose Gradle plugin. If you don't use resources in your project then tasks will be just skipped.

bitspittle commented 1 week ago

Thanks for the reply!

Sounds like this is WAI. Also, moving forward we're going to drop the jetbrains compose plugin since with K2 it seems like we don't need it anymore. So I'm going to go ahead and close this issue.