开发者

Android Eclipse test projects cannot be used with a project being built in an Android build tree

An Android Java project placed in a git repository and built in an Android tree in /packages/apps needs to have the project files located a开发者_高级运维t the root of the git repository.

This is problematic for creating a complementary Test project, which should ideally be included in the same git repository so commits are atomic for both code and tests. Eclipse gets very unhappy if you include the Test project as a subdirectory.

Is there an appropriate approach for dealing with this other than creating a second repository?


I dont know git but this seems to be a code organization problem rather than git issue. I think I would create a workspace and then have the application and test project as sub projects within that workspace, like this

/packages/apps/<product-name> - This is the workspace

/packages/apps/<product-name>/app-name - This is the application

/packages/apps/<product-name>/app-name-test - This is the test project for the application


I don't use git inside eclipse. I have my repo cloned at ~/work/repo and have 2 subfolders one for the actual project and one for the test project. Then inside my workspace i have 2 symlinks that point to the folders inside the repo folder. Eclipse thinks they are both normal projects and doesn't care about the repo management. I just go to command line and "cd ~/work/repo; git add .; git commit; " and i can commit both test and code at the same time.

Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜