-
User Story
-
Resolution: Unresolved
-
P1: Critical
-
None
-
None
Why?
Cause - Why, why, why this is needed?
- Hard coded Qt (or any) paths in example cause issues to users using the Qt Quick for Android examples Gradle files
Customer - Who needs this??
- Especially the fresh users might benefit from this
Cruft - Why this would not be needed?
- The current implementation works as well. But every time you need to change the paths.
What?
Definition - what is this?
At the moment we have some big issue with paths:
- Putting paths in build.gradle is not portable
- Putting paths in gradle.properties is not portable
// build.gradle QtBuild { qtPath = file(”/Users/assam/Qt/6.9.1") } // gradle.properties qtPath =”/Users/assam/Qt/6.9.1”
This results in issues like:
- The number of issues we got from hard-coded paths in the setup is just too much.
- Both sync and build issues, sometimes with cryptic errors.
- Managing the project in a version control system will be a mess.
The initial reason we kept the option to add Qt paths in the Gradle files was to:
- Allow Qt GP to run without much configuration.
- Support running Qt Quick View examples out of the box.
- Let’s face it, we are supporting those two cases by breaking the whole other user experience.
The most straightforward solution would be to:
- For command-line builds, provide paths to the project using Gradle arguments and environment variables.
- For IDE builds, set the paths in QtTAS and have it pass them to project using point (1) above.
- Optionally, keep the option of paths in build.gradle or gradle.properties, but only as a fallback.
- The priority should be passed arguments, then environment variables then Gradle files.
With that we would be able to use Qt GP by doing:
// Using arguments ./gradlew build -PqtPath=”/Users/assam/Qt/6.9.1” // Using environment variables export Qt_ANDROID_PATH=”/Users/assam/Qt/6.9.1” ./gradlew build // OR Qt_ANDROID_PATH=”/Users/assam/Qt/6.9.1” ./gradlew build
And for IDE users, we would have QtTAS write the paths set in the Settings page to local user files like under .idea, or to local.properties (this if no other way to directly use APIs to communicate between QtTAS and QtGP).
Demarcation - what this is not?
TODO
Dependencies - what is needed for this to make it happen?
Spike first, then changes to both QtGP and QtTAS side
- covers
-
QTTA-228 QtGP examples QtPath version improvement
-
- Reported
-
-
QTTA-289 QtGP Improve wrong qtPath error message
-
- Reported
-
- is required for
-
QTTA-314 Qt Gradle Plugin 1.4
-
- Open
-
- relates to
-
QTTA-228 QtGP examples QtPath version improvement
-
- Reported
-
-
QTTA-408 Make QtTAS handle Qt settings before handing them to QtGP
-
- Open
-
-
QTTA-434 QtGP & QtTAS: Drop ABI path field
-
- Open
-
1.
|
QtTAS & QtGP Spike value passing options |
![]() |
Reported | Nikunj Arora |
2.
|
QtGP to use local (local.properties) paths |
![]() |
Reported | Nikunj Arora |
3.
|
QtTAS to write paths into local (local.properties) |
![]() |
Reported | Nikunj Arora |
4.
|
QtGP Qt paths as arguments or variables |
![]() |
Reported | Nikunj Arora |
5.
|
QtGP examples QtPath version improvement |
|
Reported | Nikunj Arora |
6.
|
QtGP Improve wrong qtPath error message |
|
Reported | Nikunj Arora |