Internal header files

This has been asked before, but what is the best way to handle internal headers in a native component (ie headers needed for compiling my library, but which should not be exported to users of my library)?

I think the official stance is to put them in the source folder, but I have multiple source folders (some for common code and others for platform-specific variations). If I put the internal headers in one source folder, sources in the other folders can’t use it. I can list them as exportedHeaders of course, but that is exposing internal methods that shouldn’t be exposed.

Are there any plans to enhance the native build functionality to create some kind of internalHeaders block to complement exportedHeaders? I’m curious if this is a potential future enhancement or if a specific design decision has been made to not include it.

Any update on this? I’d be interested as well to see if any support for internalHeaders is planned.

Hi Mike,

We yet to improved the model to support this use case. Another alternative is to use the command line flag of the compiler to specify the internal headers folders to use. Those won’t be included the consumer project. The downside with this approach is Gradle won’t be aware of them and you will have to add custom logic to modify the Visual Studio generated projects.

Don’t hesitate to open an issue on GitHub is there isn’t one already open for this feature request,