Acknowledged
CIQQA-4127

Add device identifier variable to Monkey Jungle

It would be very helpful if Monkey Jungle provided a built-in variable for the target device identifier (e.g. fr255, fenix7) during the build process. Currently, device-specific handling often requires defining paths per device. Introducing a predefined variable such as $(device) that resolves to the current target device would enable dynamic inclusion of device-specific directories in source and resource paths and remove the need to define paths separately for each device.

For example:

base.sourcePath=somedirectory/$(device)
  • why does the epix2pro47mm need its own source files, for example? 

    One use case for device-specific source folders is device-specific properties. I am not a fan of CIQ resource properties, because they cannot be changed once the app is installed. When an update is installed, the previous property value is kept, even if the update contains a new one.

    Instead, I use a singleton base class that defines the default property values and checks whether an override class exists. These override classes are placed in the device-specific source folders.

  • Having a bunch of different source files sounds like it would make support pretty messy.

    Why not limit the source file and use annotations/ "has" to reduce this?

    why does the epix2pro47mm need its own source files, for example?  

    I have apps that I started back when there were only a few CIQ devices, that today also support the latest, all using the exact same source files.

  • But by default it already looks for source-$device/ , what am I missing?

    Yes, but that makes the project root quite messy if you keep a separate resource and source directory for each device there.

    So instead I use subdirectories, for example resources/drawables/generated/epix2pro47mm or source/properties/devices/epix2pro47mm.

  • But by default it already looks for source-$device/ , what am I missing?