Add support for ProductFlavors

Issue #42 new
deveth0 created an issue

If you create a nbandroid gradle project and add a new product flavor, the folders of those flavors are not visible in Netbeans. It would be create to see them :)

Note: this works for Instrument Test Packages, but apparently only for one product flavor (I've got a test "StartActivityTest" for two flavors but only the first flavor is displayed)

Comments (6)

  1. Radim Kubacki

    If you edit your build.gradle to add new flavor you will need to reload the project in NetBeans to let it know about the new setup. Also you will need to switch active BuildVariant to that new flavor in project customizer (better UI for this is pending item). The idea is that there is only one BuildVariant active at the time.

  2. deveth0 reporter

    Ah OK. I use the flavors to build both a paid and a free version which both use different assets. Therefor it would be important for me, to see both flavors in NetBeans (including the source, asset and res folders) Probably another solution would be to allow the developer to open the project multiple times (once for each flavor).

  3. Radim Kubacki

    You can see all files in Files tab (Ctrl-2). Showing all source roots (and marking active vs. not active somehow) is possible though I am afraid there can be too many of them to create confusion.

  4. deveth0 reporter

    yeah, but not in the projects tab which would be great. Probably you can add checkboxes or something like this to the project's properties to add/hide source-roots?

  5. Log in to comment