alternative to git-repo ( aosp repo )
Asked Answered
S

2

14

I have recently started to look into android development (aosp) and read about "repo" tool/wrapper that takes care of all the android's sub projects .

While I think repo does a fairly good job at what it does, I wanted to know if there are any alternatives to it.

I thought git submodules are sufficient for this but many posts on internet discourage use of submodules ( due to some "drawbacks" which I feel are not drawbacks at all ).

Keeping in mind that the source code for different sub projects should have their own releases or indipendednt code bases I am not sure if git subtree is a good solution for this.

It would be great if someone can point out some alternatives to repo or any other information about this.

Swacked answered 11/12, 2014 at 15:46 Comment(3)
Just be brave and use submodules. They are a powerful tool.Haerr
submodules are great if you use them right. if you have a usecase that they weren't designed for, then don't use them.Wensleydale
@Wensleydale "if you use them right" - it implies all developers in a company use it right. It is impossible. 90% of people, in my not humble opinion, are simply not qualified for their work. It should be taken into account while choosing tools that demand discipline and knowledge.Shipment
T
7

The repo tool is the standard way to work with AOSP code base. Sure you can manually manage the repos yourself but that is going to be rather tiresome and error prone.

Otherwise using submodules or subtrees won't let you inter-operate with Google and everyone else working on the AOSP codebase, so unless you are planning to do a one-way fork of AOSP there are no alternatives to the repo tool for working on AOSP.

Ticktock answered 8/7, 2015 at 0:15 Comment(0)
S
2

repo has one huge disadvantage: it detaches HEADs. You can't switch to specific branch under specific subrepo. Unless you do repo start

tsrc, as far as I know, has less functionality but doesn't have this specific problem.

Also, you can use embedded mechanisms of build systems like Bazel (git_repository/new_git_repository).

Shipment answered 18/4, 2020 at 22:14 Comment(1)
looked around for an tsrc example "in use" and found github.com/stigmee/manifest that has manifest files for repo and tsrc both to compareShaquitashara

© 2022 - 2024 — McMap. All rights reserved.