Idea plugin generate project pre-linked with gradle(w)

Is there a standard way to generate an idea project that is already linked with gradle (the wrapper)?
The reason we need this is that we are doing a few customizations with the XMLs to save us from editing the project settings manually every time, but it appears that linking the build with gradle without any user action is not very easy. The only option seems to compare the differences in project files across linked and unlinked versions, reverse engineer the XML generation and hope it works.