How to apply plugin based on build type (Android)

Plugins can’t be applied to only “part of your project”. They are either applied or not. What is the use case where this becomes a problem for you?