Browse Source
With the new API it is possible to customize compose resources directories. For example: ```kotlin abstract class GenerateAndroidRes : DefaultTask() { @get:Inject abstract val layout: ProjectLayout @get:OutputDirectory val outputDir = layout.buildDirectory.dir("generatedAndroidResources") @TaskAction fun run() {...} } compose.resources { customDirectory( sourceSetName = "androidMain", directoryProvider = tasks.register<GenerateAndroidRes>("generateAndroidRes").map { it.outputDir.get() } ) customDirectory( sourceSetName = "desktopMain", directoryProvider = provider { layout.projectDirectory.dir("desktopResources") } ) } ``` <!-- Optional --> Fixes https://github.com/JetBrains/compose-multiplatform/issues/4718 Fixes https://github.com/JetBrains/compose-multiplatform/issues/4564 ## Release Notes ### Features - Resources - Add a customization for resources directories. Now it is possible to use e.g downloaded resources.pull/3640/merge v1.7.0-dev1703
Konstantin
5 months ago
committed by
GitHub
5 changed files with 60 additions and 13 deletions
Loading…
Reference in new issue