alternative to git-repo ( aosp repo )

2.3k views Asked by At

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.

2

There are 2 answers

1
Michael A. On

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).

0
Maks On

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.