![]() One of the modules is the app module itself, while libraries it uses could be added as separate modules (together with their sources if developed simultaneously with the app itself) or as binary Maven dependencies (and then one cannot change their sources on the fly). They are organized as Gradle projects containing Gradle modules. When you create an Android library in the Android Studio, it puts the library as another module into the same app project.Īndroid app projects are usually built with Gradle. We will adopt a modification of the second approach because it’s natural to the Android Studio. But, besides other well-known drawbacks of the monorepo approach, it’s the best practice to place all code components inside one project directory - yet the ‘commonlib’ can’t be inside the same directory with ‘app1’ and ‘app2’ at the same time ![]() ![]() But with two or more apps it would be an obvious code duplication and therefore not an option.įinally, there’s the “monorepo” approach: put all code - (‘app1’, ‘app2’, and ‘commonlib’) into the same Git repository and manage it together. With just one app that would have worked. If the changes do not work as intended, one has to repeat.Īnother approach would be to put the ‘commonlib’, code into the same repository and project as ‘app1’ or ‘app2’.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |