Fixes ISSUE-47174. Simplify & speed up calling generate.entities*
2 set of changes
a.) Change GenerateEntitiesTask to directly to the work in its main method instead of calling into AntExecutor and getting called again as an ant task.
That simplifies both the build.xml & src/build.xml by removing the additional generate.entities.quick.forked target as well as simplifes the java code slightly. Extra benefit is shaving of 2-3 seconds of runtime of generate.entities.quick call which is called indirectly by various other build tasks.
Side-effect: Stop supporting the obsolete friendlyWarning flag which is not set anymorr after the MMC rebuild popup removal.
b.) Fix incremental compile Same fix as done in old issue 20416
When the relative file-path javac tasks finds the file with does not match the javapackage of a source file the 'incremental' part of javac does not work and it will recompile the source file always (even without changes).
That happened in 2 places:
- compile.src.gen always compiling 4 source-files Can be seen with '-v' flag to ant here [javac] modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/model/domaintype/DatasourceDefinition.java added as modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/model/domaintype/DatasourceDefinition.class doesn't exist.
- java after generate.entities.qcuik always compiling 1 file (WeldUtils.java)
Fix that by properly splitting 'base-folder' i.e. src-subfolder in a module from the 'include' part for *.java
Both changes together change ant generate.entities.quick runtime (when nothing changes) for ca. 10s down to 4 seconds.
- has real api changes (GenerateEntitesTask does no longer implement ant-"Task" + removal of some getters-setters
- try-api above shows more changes but those are unrelated (api was broken at moment of push)