Set Android versionCode from inside a task

Unfortunately, no. I settled with changing the versionCode from a shell script that I run before my Gradle build.