I have a simple C program (helloworld
) compiling and building on my Windows 7 machine (via MinGW) using Make. I would now like to switch my build system to use Gradle (personal reasons, no disrespect to Make!) and am trying to wrap my brain around the Gradle Native Plugins (and really, the C plugin).
I have two specific concerns:
- Does the C plugin require a certain project directory structure like most other Gradle plugins do? In the C plugin's docs, I see several instances of a source folder named
src/main/headers
. In Java-land, Gradle by default expects you to have, say,src/main/java
andsrc/main/resources
, to function properly etc. If the same is true of the C plugin, what is this required/recommended directory structure for a C program? - I understand the documentation's explanation of platforms, but flavors flew right over my head; and using platforms and flavors together is an even bigger mystery. Say I want to define one build variant to support Linux on x86 architecture, and another variant to support 64-bit Windows. What's an example of a platform/flavor combo that would achieve these variants?