making it run on gradle and adding script to rename files