Application plugin start scripts template with custom variables

I’m trying to customize the start scripts generated by application plugin and can’t find the API to pass my custom variables to default TemplateBasedScriptGenerator used by startScripts task. If it doesn’t exist, what is the workaround ? Thanks