Bug 1728666 - Allow building artifact builds without the NDK. r=nalexander

Looks like the new gradle version throws an exception now.

Differential Revision: https://phabricator.services.mozilla.com/D124258
This commit is contained in:
Agi Sferro 2021-09-01 21:59:41 +00:00
Родитель 8bf1867b97
Коммит 44c6b0ba31
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -22,8 +22,12 @@ def getNDKDirectory() {
if (project.mozconfig.substs.ANDROID_NDK) {
return project.mozconfig.substs.ANDROID_NDK
}
if (project.android.ndkDirectory) {
return project.android.ndkDirectory
try {
if (project.android.ndkDirectory) {
return project.android.ndkDirectory
}
} catch (InvalidUserDataException ex) {
// The NDK is not installed, that's ok.
}
def mozbuild = System.getenv('MOZBUILD_STATE_PATH') ?: "${System.getProperty('user.home')}/.mozbuild"
def files = new FileNameFinder().getFileNames(mozbuild, "android-ndk-*/source.properties")