I'm planning an open source project which I want to publish on GitHub. I want to create several projects which extend each other. But I want the option to change a common base class which should be merged with its parent project but only that shared files the extensions without common files should be independent.
Here are my three example projects:
Project A:
I want to implement a helpful class called ObservableArray. That class will extend a List which observes with an interface its items and propagates these changes out to registers listeners. This should be useful for multiple projects like my Project B.
Project B:
I want to implement a SQlite database warper which allows a simple access to a list of rows which are just plain classes. With the help of project A it will be simple to track the changes in the data model which can be simple synced with the SQLite database.
Project C:
This project should take the database warper and put it into an Android ContentProvider for some other use cases.
As you can see all three Projects are built on top of each other but Project A or Project B but a user may not need the support of ContentProviders so far I want to make that to independent projects. I think it is too much overhead to let the user of project C update all the three independed projects. So my idea was to fork one project the other so that each project can updated or how this is called in GitHub.
My questions are:
- Is it possible to fork the project so it is possible to update the base class in both directions?
- Let's say I need to update a class of Project A what steps do I need to do to update both other projects?
- How do I prevent that I check in a file of Project C by accident in Project A? I would use different namespaces so I would be able to use a ignore list. Would this solve my problem?
I know that are quiet basic questions I tried to understand the basics of git and the fork graph from GitHub let me think that this should be possible but it seems that this only works if you have multiple accounts. Please enlighten me!