aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorOlli Vuolteenaho <[email protected]>2025-07-02 13:36:02 +0300
committerOlli Vuolteenaho <[email protected]>2025-07-03 03:44:45 +0000
commita535ecb1ceef3f5e5a497d60c21260f94fc9d66a (patch)
tree404097dbe3189f660498ba12407d1496fa4ca013 /src/test
parente0c7255df00ecc86c8d56d1cf2a19c6315610a47 (diff)
Improve QtGP error messages for nonexisting directoriesHEADdev
With the current implementation the error messages for typoing the three user-defined paths in gradle.properties are terrible. If the user sets qt.path to a nonexisting directory: * What went wrong: Execution failed for task ':app:QtBuildTask'. > No Qt for Android kit found from: This is the best one, as at least it shows that something is wrong finding Q4A. For a wrong qt.abiPath the abiPath is ignored and a normal multi-ABI build is started instead without showing any error. Probably not the desired course of action. And if qt.projectPath is wrong: * What went wrong: A problem occurred configuring project ':app'. > Could not create task ':app:QtBuildTask'. > Cannot cast object '' with class 'java.lang.String' to class 'java.io.File' This all stems from the getAbsolutePath function returning an empty string if the path doesn't exist. By removing that we can get better error messages from later down in the chain or from gradle: * What went wrong: Execution failed for task ':app:QtBuildTask'. > No Qt for Android kit found from: /Users/ollivuolteenaho/Qt/not-here * What went wrong: Execution failed for task ':app:QtBuildTask'. > No Core.json file found under /Users/ollivuolteenaho/Qt/not-here/ android_arm64_v8a/modules/Core.json. * What went wrong: A problem was found with the configuration of task ':app:QtBuildTask' (type 'QtBuildTask'). - In plugin 'org.qtproject.qt.gradleplugin' type 'org.qtproject.qt.gradleplugin.QtBuildTask' property 'projectPath' specifies directory '/Users/ollivuolteenaho/Qt/Examples/Qt-6.9.1/ platforms/android/doesnt-exist' which doesn't exist. We could also raise an error QtGradlePlugin.yaml:buildTask but a problem with that approach is that it also blocks "gradle clean", because the error is in the plugin configuration stage at that point. So this seems like the simple quick fix to make everything more sensible and future improvements can be handled through QTTA-342. Fixes: QTTA-357 Change-Id: I469cb64cb9e9f07a408886747cbbb2a6274578d4 Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions