Skip to content

Can't get aboutlibraries.json inside of build/generated to work with CMP resources #1310

@paigely

Description

@paigely

I would like to put the generated json file inside of build/generated (because I would rather not have a generated file in my source tree, feels weird,) and then have compose multiplatform pick it up and copy it to the bundle, but I'm not really sure how to do so. I tried this but the file is ignored and the app crashes when trying to access it:

aboutLibraries {
	collect {
		configPath = file("acknowledgements")
	}
	export {
		outputFile = file("build/generated/sources/aboutlibraries/commonMain/kotlin/paige/navic/composeResources/files/acknowledgements.json")
	}
}

This works, though:

		outputFile = file("src/commonMain/composeResources/files/acknowledgements.json")

Is there some way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions