android: use projectDir for VERSION file path
Otherwise Android Studio can't find the relative path because it uses `/` as it's working directory. Which makes no sense. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2bfc57281a
commit
41f2c08736
|
@ -159,7 +159,10 @@ def getVersionName = { ->
|
|||
if (project.hasProperty("releaseVersion")) {
|
||||
return project.releaseVersion
|
||||
}
|
||||
version = new File('../VERSION').text
|
||||
/* Necessary because Android Studio uses wrong PWD.
|
||||
* Is actually absolute directory path of this file. */
|
||||
def configDir = project.projectDir.toString()
|
||||
version = new File(configDir + '/../../VERSION').text
|
||||
return version.replaceAll("\\s","")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue