Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. def find_gradle_root_project():
  2.     # Handle both directory structure types: ones with Projects/Android and ones without
  3.     paths = ['.', '../../', '../../../']
  4.     for path in paths:
  5.         # settings.gradle files indicate a Gradle app (or 'root project')
  6.         # whereas build.gradle files indicate a Gradle project/module that
  7.         # typically the app will pull in via settings.gradle.
  8.         if os.path.exists(os.path.join(path, 'settings.gradle')):
  9.             return os.path.join(path, 'build.gradle')
  10.     return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement