Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Why are we doing this?
- With modern Android development patterns, using modules is a common practice. In this approach, the android project can have any arbitrary structure which the QtTAS plugin will have no idea about where to read QtGP properties from.
- Even if the QtTAS plugin knew where to read it from, there is no API in Jetbrains for working with custom gradle blocks (QtBuild {} block in our case). So we had to rely on using regex, which can cause a lot or errors.
What's the plan?
- We decided that it would be good to have a central configuration file which both the QtTAS and QtGP can access.
- This eliminates the need for the QtTAS to use regex on the build.gradle file.
- We decided to make use of the gradle.properties file which is already present in Android Projects and which the Android Gradle Plugin uses for its configurations.
- The user can manually add the Qt configurations (Project path, Qt path, etc) in that file, or the QtTAS plugin can automatically add it for them.
Definition of done
- The QtTAS plugin is able to read and write to the gradle.properties file and we can bring back the settings page, and give back the functionality to Create/Import Qt projects
Attachments
Issue Links
Gerrit Reviews
For Gerrit Dashboard: QTTA-141 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
584521,1 | [WIP] PoC on reading and modifying gradle.properties file | dev | qt-labs/android-studio-tools | Status: ABANDONED | -2 | 0 |
642848,7 | Remove CodeSnippetDialogWrapper | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
643112,2 | Enable Qt Settings view | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
644882,11 | Create a class for managing reading/writing to gradle.properties | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
649223,8 | Write properties to gradle.properties file from Android Studio UI | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
652266,15 | Add Settings UI for writing Qt properties to gradle.properties file | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
654498,13 | Add a combo box to apply QtGP plugin to the current Android project | dev | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
655553,2 | Create a class for managing reading/writing to gradle.properties | 4.1 | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
655554,2 | Write properties to gradle.properties file from Android Studio UI | 4.1 | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
655555,2 | Remove CodeSnippetDialogWrapper | 4.1 | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
655964,2 | Add Settings UI for writing Qt properties to gradle.properties file | 4.1 | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |
656577,2 | Add a combo box to apply QtGP plugin to the current Android project | 4.1 | qt-labs/android-studio-tools | Status: MERGED | +2 | 0 |