简体   繁体   English

版本控制和Android库项目

[英]Version control and Android Library Projects

When using Android Library Project does anyone have a good solution for version control for projects that utilise these librarys? 使用Android Library Project时 ,对于使用这些库的项目,是否有人有很好的版本控制解决方案?

For example if I have two apps, say a free version and paid, or phone and tablet, or any other scenario, and i want them to use some shared library's which are contained in an Android Lib Project, how can i safely add these projects to SVN? 例如,如果我有两个应用程序,例如免费版本和付费版本,或手机和平板电脑,或任何其他情况,并且我希望它们使用Android Lib项目中包含的某些共享库,我如何安全地添加这些项目到SVN? As they are seperate projects I have no way i know off enforcing that when one is committed the other (library one) is also. 由于它们是单独的项目,因此我无法强制执行一个(另一个)(库)提交。

I am using Eclipse with the Subclipse SVN plugin, does anyone know if there is a way to link the projects so a commit on one will commit the other? 我正在使用带有Subclipse SVN插件的Eclipse,有人知道是否有一种方法可以链接项目,以便对一个项目的提交将对另一个项目的提交吗?

Any tips here would be welcome - as I am relatively new to SVN - so may be thinking about this in the wrong way :) 这里的任何技巧都是可以接受的-因为我对SVN还是比较陌生的-因此可能会以错误的方式考虑这个问题:)

Thanks 谢谢

You cannot enforce that both are committed at the same time (that's just not how SVN works), but you can still do it (by, as bigstones said, using Ctrl+Click or putting both of them in a Working Set, and committing that). 您不能强制要求两者都同时提交(这不是SVN的工作方式),但是您仍然可以做到这一点(就像bigstones所说的那样,使用Ctrl + Click或将它们都放入工作集中,然后提交) )。

The way Android handles libraries is indeed quite flawed, and this is one of the reasons for it. Android处理库的方式确实存在很多缺陷,这就是它的原因之一。

I'm quite new to versioning too, I'm using Subclipse too, I don't know if there's a way to commit both project and lib at once (if not selecting both with ctrl-click), but actually the "modified" icon is pretty visible and I never forgot about it. 我对版本控制也很陌生,我也使用Subclipse,我不知道是否可以同时提交项目和lib(如果不使用ctrl-click两者都选择),但是实际上是“修改过的”图标很明显,我从未忘记它。

The problem for me is that sometimes I modify the source opening it from the lib project, sometimes opening the source referenced in the app project, and I must remember to refresh the other. 我的问题是,有时我会修改从lib项目打开它的源代码,有时会打开在应用程序项目中引用的源代码,而且我必须记住要刷新另一个源代码。 In case I forget it, in the second case, the lib project won't show the "modified" icon, so I end up refreshing both projects very often. 万一我忘了它,在第二种情况下,lib项目将不会显示“修改”图标,因此我最终经常刷新两个项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM