| # Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file |
| # for details. All rights reserved. Use of this source code is governed by a |
| # BSD-style license that can be found in the LICENSE file. |
| # Wrapper script for running gradle. |
| # Will make sure we pulled down gradle before running, and will use the pulled |
| # down version to have a consistent developer experience. |
| GRADLE_DIR = os.path.join(utils.REPO_ROOT, 'third_party', 'gradle') |
| GRADLE_SHA1 = os.path.join(GRADLE_DIR, 'gradle.tar.gz.sha1') |
| GRADLE = os.path.join(GRADLE_DIR, 'gradle', 'bin', 'gradle') |
| # I know this will hit os on windows eventually if we don't do this. |
| if not os.path.exists(GRADLE): |
| # Bootstrap gradle, everything else is controlled using gradle. |
| utils.DownloadFromGoogleCloudStorage(GRADLE_SHA1) |
| print 'gradle.py: Gradle binary present' |
| with utils.ChangedWorkingDirectory(utils.REPO_ROOT): |
| subprocess.check_call(cmd) |
| if __name__ == '__main__': |