Gradle Native override source path

I’m trying to use the new C++ plugins as described at:

The native-samples repo on Github ( has been very useful in getting started. I was able to build and run the projects. Now I would like to start modifying the samples to fit into my project. One issue I hit right away is the directory structure for my library is different than the simple-library example (, which uses src/main/cpp. How do I change the directory path to match my project? I tried the method described here:

However, that did not work. I wasn’t surprised because that sample uses the “cpp” plugin and not the cpp-library or cpp-application plugins.

Thanks in advance!

We don’t call it out as such, but this sample uses the SwiftPM conventional layout and configures Gradle to expect the same:

This is exactly what I needed! Thanks again for your help.