New gradle support 0.5.+

Change-Id: Iad3ab7a3facd3dd9a3034992252267308f87f24e