I need some help figuring out the best way (or best practice) to organize my Android project. For simplicity, let's say my Eclipse workspace for Android is C:\Android\Projects\
. Inside this folder, I like separate applications from libraries, and I have two other folders, C:\Android\Projects\Applications
and C:\Android\Projects\Components
.
For one project, I cloned the library from GitHub to the Components
folder, say C:\Android\Projects\Componentes\SampleLib
(there are two folders TheLib
and TheLibExample
inside this folder). And my application is created in C:\Android\Projects\Applications\MyTestApp
. Then I included the library in the application by following these instructions .
Now let's say that I want to use GitHub to share my application with the open source community. I will create a repository and push everything from C:\Android\Projects\Applications\MyTestApp
to some repository.
If someone wants to unlock my application or even help me, he will need a library to compile and run it, which is not included in my project. The default.properties
file will have something like android.library.reference.1=../Components/SampleLib/TheLib
and that someone will have to manually clone this library and they will need to put it in the same relative path otherwise it will ruin the initial control for my application.
The only way to solve this problem is to organize my workspace as follows:
C:\Android\Projects\Applications\MyTestApp\TheApp C:\Android\Projects\Applications\MyTestApp\TheLib C:\Android\Projects\Componentes\SampleLib
And my repository should be populated with content from C:\Android\Projects\Applications\MyTestApp\
.
But what happens when the library is updated? I canβt just pull the new changes, I need to copy them to TheLib
folder. In the previous folder organization, this would not have been necessary, as I was referring to the original cloned repository, not a copy.
What should I do then? Should I go with option one, and let someone fork my project with library dependencies as they see fit, or should I go with the second and give everyone more work, keeping the two folders in sync when the original pulls the changes from it ?