Android: Copy required gradle files in non-prefix shadow builds

This fixes running 'make apk' in a qmake android project,
when using a shadow non-prefix build.

An implementation detail is that COPIES can't take both files and
directories as values, so we split them into two steps.

Task-number: QTBUG-85399
Change-Id: I7373d6b7aede6e33096cb9718c679fa5e5dc1703
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2020-08-14 15:52:13 +02:00
parent 57b928a1a5
commit 18cb90cd31

View File

@ -2,14 +2,20 @@ TEMPLATE = aux
TARGET = dummy # Avoid a conflict with the existing gradle directory TARGET = dummy # Avoid a conflict with the existing gradle directory
CONFIG -= qt android_install CONFIG -= qt android_install
gradle.files = \ gradle_files.files = \
$$PWD/gradlew \ $$PWD/gradlew \
$$PWD/gradlew.bat \ $$PWD/gradlew.bat
gradle_dirs.files = \
$$PWD/gradle $$PWD/gradle
gradle.path = $$[QT_INSTALL_PREFIX]/src/3rdparty/gradle gradle_files.path = $$[QT_INSTALL_PREFIX]/src/3rdparty/gradle
gradle_dirs.path = $${gradle_files.path}
INSTALLS += gradle INSTALLS += gradle_files gradle_dirs
!prefix_build:!equals(OUT_PWD, $$PWD) {
# For COPIES to work, files and directory entries need to be separate objects.
COPIES += gradle_files gradle_dirs
}
!prefix_build:!equals(OUT_PWD, $$PWD) { !prefix_build:!equals(OUT_PWD, $$PWD) {
RETURN = $$escape_expand(\\n\\t) RETURN = $$escape_expand(\\n\\t)