I noticed that on some Android projects I could see the (compiled) .lu files inside the assets folders.
I was pretty sure that they are not needed since they are all combined in the resources.car file during building.
After some digging, I found out that the issue is that the command do remove the .lu files is not properly escaping paths that have spaces.
The current command for non-windows machine is:
Compile.lua (line 378)
print( 'Removing: ' .. CORONA_TARGET_EXECUTABLE_DIR .. '/*.lu' ) local result = os_execute( 'find -H', escape( CORONA_TARGET_EXECUTABLE_DIR ), '-maxdepth 1 -name "*.lu" -print', -- avoid cmd line length issues with "*.lu" '|', 'xargs rm -f')
but when you do a FIND, the paths will be printed to the console without the proper escaping.
So, if you do not want to have several unused files in your app, you have 2 options:
a ) Make sure that your project path does not have spaces
b ) Change the code above of compile.lua file (../Corona Enterprise/Corona/shared/bin/Compile.lua) to escape the files path for you. A modified version working version could be:
print( 'Removing: ' .. escape(CORONA_TARGET_EXECUTABLE_DIR) .. '/*.lu' ) local result = os.execute( 'find -H ' .. escape( CORONA_TARGET_EXECUTABLE_DIR ) .. ' -maxdepth 1 -name "*.lu" -print' .. -- avoid cmd line length issues with "*.lu" ' |' .. " sed 's/ /\\\\ /g'" .. ' |' .. ' xargs rm -f')
Be aware that any change to the compile.lua file would be lost when you upgrade your Corona to a new version. Hopefully Corona folks will see this post and fix that issue on a future daily build.
UPDATE: This was fixed on Corona 2018.3194 daily build.