Docker command to pass build info as args from gradle to build.gradle at build time.

docker run -e BUILD_NUMBER=%system.BUILD_NUMBER% — rm -v “$PWD”:/home/gradle/project -w /home/gradle/project/X X/androidbuilder:26 gradle -PdisablePreDex -DBUILD_NUMBER=%env.BUILD_NUMBER% -DTEAMCITY_BUILDCONF_NAME=Release assembleGoogleFlavorX assembleGoogleFlavoX assembleGoogleFlavorX assembleAmazonFlavorX assemble VanillaFlavorTuneinFreeX

X equals your Android project name. Let me know if you have questions.