Add godot android plugins to custom export template

Godot Version

Godot 4.3 stable

Question

Hi,
I have created a 2d game which has some settings that require a game restart when changed (on mobile and desktop platforms).
Because godot has no build in function for android to restart the whole game i made a godot android plugin to add this functionality.
The plugin works like a charm but i have to tick the option “use gradle build” tho which is not that much of a problem.
But here is the thing: I compiled the godot engine and added some custom functionalities to improve my development. And then also created custom export templates due to those new functionalities and some performance improvements. But when i want to use those custome templates i can not tick “use gradle build” anymore, so my restart game android plugin can not be exported to android. How can i accomplish it’s export without the need of godots export gradle build option. Is there a way to add my plugin directly into my custom template?