Cordova Android: Request Permissions only if ...?

Is there a way to request permissions on app start only when a specific condition, like (build == debug), is met?

I am basically looking for a way to create two different AndroidManifest.xml for debug and release builds…

Ok, right now I think:

You can put a AndroidManifest.xml in /src/debug/ that is only applied (merged with the main one) on the build variant debug. (This includes unit tests and instrumented tests, although it seems noone really knows why this works this way, so you put it in debug instead of test or androidTestas expected.)