I've been having issues adding a submodule to my android project. I've tried all tutorials and some solutions available online but none exactly says what to do add a submodule and also keep your commits on it in sync with the main repo.
Solutions I've tried:
No matter what I do, so far none of the tutorials available online has helped. Please suggest something, if you've worked with submodules and was able to work with them keeping everything in sync with main repo.
What actually I want to do:
Main Project: A submodule: demo I want to keep demo repo as a base app to keep all my designs, libraries and templates so that I can just add this submodule to all my projects and just pick reusable stuff from here instead of rewriting everything everytime.
I figured out the ideal solution to this. My project name: A submodule name: x
git submodule add github-link-to-submodule-x
git submodule update --init --recursive
rootProject.name = "TutorialKotlin"
project(':Tools_Demo_App').projectDir = new File('Tools_Demo_App/app')
build.gradle of library module
apply plugin: 'com.android.application'
to apply plugin: 'com.android.library'
make sure there is no launcher activity in AndroidManifest.xml
sync the project and it works fine.