How to extend the Native binary model to incorporate partially linked object creation?

plugins

(Ganesh) #1

For my native application, I would like to build a partially linked object file from a set of C sources. By default, Gradle provides only an executable or a library(static/shared) as a binary type. How can I extend the model to create a partially linked object?

I just need pointers on how I should go about this process and some documentation where I can find information for such activities.


(Daniel Lacasse) #2

Hi Ganesh,

I feel bad not taking the time to answer this sooner. The documentation can be found here. I suggest reading getting familiar with Rule based model configuration, Software model concept and Implementing model rules in a plugin.

Generally speaking, the Gradle internal API, especially for the native, should be avoided when extending the model as Gradle doesn’t make any promise in terms of backward compatibility and breaking changes. That been said, if you simply want to prototype a proof of concept, you would definitely cut down your work in using certain API that handles the binaries dimension, etc. The documentation for those API won’t be on your side but thanks to the software model rules, it’s quite easy to understand without documentation. Start by looking at how the plugins are implemented. This should give you lots of good information.

I hope this helps, don’t hesitate to ask more questions,

Daniel