Updated Gradle files to latest versions to target latest SDK and fix deprecation issues.