I’ve found an easier way to change the minSdkVersion (and similar options) without having to write your own plugin:
minSdkVersion