aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2020-02-04 20:31:26 +0300
committerAlberto Mardegan <mardy@users.sourceforge.net>2020-02-05 11:55:36 +0000
commitd853817741ebf62721a32540775f47d08668712b (patch)
treeda294f2dd1f310a2b1148514a30f663b69833099 /share
parentb2e405c2f00bc82419172bb164f0b8ad75427dfc (diff)
Android: handle relative sourceset directories
Allow the resourcesDir, sourcesDir and assetsDir to be specified as relative paths. Also, change their type to `path`, as that better fits their role. Change-Id: I76df92fe763154f80ca3759e15de3ad70173632b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/Android/sdk/sdk.qbs14
1 files changed, 7 insertions, 7 deletions
diff --git a/share/qbs/modules/Android/sdk/sdk.qbs b/share/qbs/modules/Android/sdk/sdk.qbs
index ecf64a188..b4ad5766f 100644
--- a/share/qbs/modules/Android/sdk/sdk.qbs
+++ b/share/qbs/modules/Android/sdk/sdk.qbs
@@ -72,12 +72,12 @@ Module {
property string apkBaseName: packageName
property bool automaticSources: true
property bool legacyLayout: false
- property string sourceSetDir: legacyLayout
+ property path sourceSetDir: legacyLayout
? product.sourceDirectory
: FileInfo.joinPaths(product.sourceDirectory, "src/main")
- property string resourcesDir: FileInfo.joinPaths(sourceSetDir, "res")
- property string assetsDir: FileInfo.joinPaths(sourceSetDir, "assets")
- property string sourcesDir: FileInfo.joinPaths(sourceSetDir, legacyLayout ? "src" : "java")
+ property path resourcesDir: FileInfo.joinPaths(sourceSetDir, "res")
+ property path assetsDir: FileInfo.joinPaths(sourceSetDir, "assets")
+ property path sourcesDir: FileInfo.joinPaths(sourceSetDir, legacyLayout ? "src" : "java")
property string manifestFile: defaultManifestFile
readonly property string defaultManifestFile: FileInfo.joinPaths(sourceSetDir,
"AndroidManifest.xml")
@@ -90,7 +90,7 @@ Module {
Group {
name: "java sources"
condition: Android.sdk.automaticSources
- prefix: Android.sdk.sourcesDir + '/'
+ prefix: FileInfo.resolvePath(product.sourceDirectory, Android.sdk.sourcesDir + '/')
files: "**/*.java"
}
@@ -98,7 +98,7 @@ Module {
name: "android resources"
condition: Android.sdk.automaticSources
fileTags: ["android.resources"]
- prefix: Android.sdk.resourcesDir + '/'
+ prefix: FileInfo.resolvePath(product.sourceDirectory, Android.sdk.resourcesDir + '/')
files: "**/*"
}
@@ -106,7 +106,7 @@ Module {
name: "android assets"
condition: Android.sdk.automaticSources
fileTags: ["android.assets"]
- prefix: Android.sdk.assetsDir + '/'
+ prefix: FileInfo.resolvePath(product.sourceDirectory, Android.sdk.assetsDir + '/')
files: "**/*"
}