How to call post-build event for native binaries like Visual studio?

I want to call a post-build event after build of project.

For example: I am compiling CPP source code and also compiling Window Resource (rc) files and link them into a native static binary.

After this step I want create the shared library using the compiled resource file ( just linking phase not compilation). Below is my Post-Build event:

link -dll -noentry LogMessages.res /out:"$(OutDir)/Sharedlibrary.dll"

In visual studio there is provision to specify the build events.

So, how we can do this in the Gradle for native banaries?

OR How to create library from the existing object files with out compiling the source.

Please let me know If you need more information. Thanks Mandar