Created
August 17, 2019 12:28
-
-
Save MathiasSeguy-Android2EE/751b262513c105ecfdabec123f7474f2 to your computer and use it in GitHub Desktop.
Does the Android project has an old Eclipse's files structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global SPLIT_CHARACTER | |
if platform.system() == "Windows": | |
SPLIT_CHARACTER = '\\' | |
else: | |
SPLIT_CHARACTER = '/' | |
#Detect if your project is in an Eclipse structure | |
def isEclipseLegacy(directory): | |
hasRes=path.isdir(directory+SPLIT_CHARACTER+'res') | |
hasSrc=path.isdir(directory+SPLIT_CHARACTER+'src') | |
hasManifest=path.isfile(directory+SPLIT_CHARACTER+'AndroidManifest.xml') | |
hasBuildGradle=path.isfile(directory+SPLIT_CHARACTER+'build.gradle') | |
# if hasBuildGradle and hasSrc and hasRes and hasManifest: | |
# print(directory+'\n\t isEclipseLegacy') | |
return hasBuildGradle and hasSrc and hasRes and hasManifest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment