Update to gradle

Updated to be gradle/Android Studio compatible. Also updated some dependencies.