Android: Revive second half of AndroidManager::updateGradleProperties

The extra "gradlew" which gets inserted into packageSourceDir makes all
paths that are subsequently based on packageSourceDir be invalid.

Amends: ded34daa2b

Change-Id: Ied7fe12a3d68c27b56eeb4d0ad4ce375ee228f4e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2022-11-23 18:58:39 +01:00
parent f2d50ba6ff
commit 4536258c9e

View File

@@ -696,9 +696,10 @@ bool AndroidManager::updateGradleProperties(Target *target, const QString &build
const QString sourceDirName = node->data(Constants::AndroidPackageSourceDir).toString();
QFileInfo sourceDirInfo(sourceDirName);
const FilePath packageSourceDir = FilePath::fromString(sourceDirInfo.canonicalFilePath())
.pathAppended("gradlew");
if (!packageSourceDir.exists())
const FilePath packageSourceDir = FilePath::fromString(sourceDirInfo.canonicalFilePath());
const FilePath gradleWFile = packageSourceDir / "gradlew";
if (!gradleWFile.exists())
return false;
const FilePath wrapperProps = packageSourceDir / "gradle/wrapper/gradle-wrapper.properties";