I’ve found and issue when working with gradle in Android projects. My system only has gradle 2.10 available and it doesn’t support some new features of the Android plugin (like the new Google maven repository) so I need to use a more updated gradle wrapper. However if I try to download a newer version with gradle wrapper --gradle-version 4.1 it parses build.gradle and fails:
gradle wrapper --gradle-version 4.1 To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.10/userguide/gradle_daemon.html. FAILURE: Build failed with an exception. * Where: Build file '/home/helloworld/Projects/Android/build.gradle' line: 6 * What went wrong: A problem occurred evaluating root project 'Android'. > Could not find method google() for arguments  on repository container. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 2.309 secs
How can I download the gradle wrapper in a folder with a build.gradle without parsing it?