Updated Gradle files to latest versions to target latest SDK and fix deprecations

...recation issues.