add version selection to build.gradle

a followup of 4099b5a9ea389b8605981f5d5c9bb6c1ece947a4
automatic clean run/mods/ folder in build.gradle