Git submodule
Android as an example
Dec 2014, Rick Mak
Slide 2
Slide 2 text
Situation
• I want to do a Swipe menu on Android
• I find a repos do what I want at Github
• But the repos don’t publish on maven (or other
hosted package management platform)
• Or want to use a specific fork/commit
Slide 3
Slide 3 text
One of the solution
• Copy the project into
libs or
SupportProjects
• Copy the jar
Slide 4
Slide 4 text
Pros and cons
• git clone and go
• Accessible and can
easily modify the
plugins
• Mixed up lib and App
code
• Difficult to update the
library
Slide 5
Slide 5 text
Use git submodule
• Smaller main repos
• Maintain the reusability of the module
• Separation of concern, Application vs module
• Contribute back of Open Source project
• Upgrade of module become easy