Update the wrapper task to gradle 1.2 and automatically add the appropriate memory options to generated files.