At the moment the following CustomBuildAction conditions exist:
1 - Before the compiler cleans the objects folder (it happens after the code is parsed).
2 - Before R.java file is generated.
3 - Before the package is signed (the APK file at this point is: bin\temp.ap_).
4 - Before the APK is installed.
5 - After the APK is installed.
A additional Action would be very helpful:
0 - Before the compiler parses the code (and reload changed files after action).
OK. But you can implement a fast prescan only for CustomBuildAction 0, then reload changed files. And after this step begin with parsing.
It should'nt be a lot of work and would be very helpful (imho, i don't know if it's also helpful for others).
Yes.
As an example i have a windows program and would create a android app as remote control (via websockets). A part of the control is very simple, therefore i can update the B4A source automatically if the windows source gets new functionality.
I can make this step before compilation, but with a CustomBuildAction i can't forget it.
Is the windows program written with B4J? If yes then it should be quite simple to share code between the two platforms (with the new shared modules feature).
I agree, this would be very useful. I sometimes rely a lot on code generators, especially when handling databases or lots of asynchroneous server calls, and it's nice to be able to have the code regenerated automatically based on current specs on compile.
I'm sorry, I somehow missed to quote. What I thought would be useful would be to be able to have a build action run before the code is compiled, so I can run a code generator automatically each build. As it is today, I can't have build actions run before the code is parsed.
the next version of b4a will support batch-compiling. I´m sure this will help you with this...
We need to be patient for the next b4a version to be released