How to clean proj.android before commit to source repositories

Once having compiled the Android project, it will have output stuff into local bin/ folders etc. This causes a problem with source repos since that would add all those unnecessary binaries to the repo. How do we clean the project folder (with the cocos command?)

And/or preferably have the cocos run command compile stuff into an outside temporary folder - how?

instead of deleting the binary stuff, you should add these files to .gitignore or equivalent if you are not using git.

Yes so how do I know what files should be ignored? I normally use SVN. I randomly exclude bin, gen, libs and some more for now. (forgot)… I think it would be very useful to explicitly list these somewhere… or put all products inside just one temp folder, maybe outside source directory. Like Xcode does :wink:

You can use cocos2d-x .gitignore as a starter point (though it will probably be over-broad for your app): https://github.com/cocos2d/cocos2d-x/blob/v3/.gitignore

It is up to you to know your build system, and what files are generated and can be safely ignored from you control-version system.