diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2022-11-23 18:58:39 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2022-11-24 10:57:58 +0000 |
commit | 4536258c9edc14906d7c6f68e7342ca55578b0be (patch) | |
tree | 42ce001971c666ce3544dd9e05f64e5902fa37f5 /src/plugins/android/androidmanager.cpp | |
parent | f2d50ba6ffe9b799e12b3c2adc9d17872315b077 (diff) | |
download | qt-creator-4536258c9edc14906d7c6f68e7342ca55578b0be.tar.gz |
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: ded34daa2b62358368a592a8aa39accdc5be1620
Change-Id: Ied7fe12a3d68c27b56eeb4d0ad4ce375ee228f4e
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/android/androidmanager.cpp')
-rw-r--r-- | src/plugins/android/androidmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 7cd940b488..29df41728b 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -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"; |