Wish Build configuration Files and libraries

stevel05

Expert
Licensed User
Longtime User
I know libraries have been wished for before, but just to keep up interest.

It would be useful to be able to exclude Files and libraries based on a build configuration, there is currently a warning given, but it would be useful not to have to switch them on and off manually for different configurations.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
but it would be useful not to have to switch them on and off manually for different configurations.
Not sure that I understand. How are the warnings related? Note that you can ignore different warnings based on the configuration symbols.

The set of included files can be changed automatically based on the build configuration.

See this for example: https://www.b4x.com/android/forum/threads/xui2d-cross-platform-tips.96815/#content
In this example the three projects share the same files. You can use multiple folders based on the compilation symbols. Robocopy also has an option to delete files in the target that are not available in the source folder.
 

stevel05

Expert
Licensed User
Longtime User
How are the warnings related?
If code is disabled using a Build Configuration, a warning appears in the logs window that a library that is only used by that code is unused.

The set of included files can be changed automatically based on the build configuration.
I hadn't seen that, thanks I will take a look.
 

stevel05

Expert
Licensed User
Longtime User
Yes, that allows me to add or remove the files, although the first run after deleting the files complains that the files aren't found and I have to sync the files folder.

For information, what I am trying to do is this:

I am developing a library that should only be run for a specific Build configuration. It is is a development utility that I don't want to be in the final app, I would prefer not to have to strip out the code and remove the library manually as if I want to do more work on it, I would have to put it all back. This involves a library and 3 layout files.

The files issue is 95% sorted with your suggestion.

It would be useful to be able to specify only include this library and these files in a jar if it has a certain build configuration.
 
Top