Hello everyone :wave: Let's assume I have an andro...
# android
g
Hello everyone 👋 Let's assume I have an android project that has a (android) module. Is it possible to copy-paste this module to another project? And if yes how would you recommend to do so?
😶 1
n
In your destination project, File > New > Import Module > You can then select the directory of the module you want to copy from
g
but I am talking about a different project. Or you mean I first copy-paste the module directory to the other project and then go to File > New > Import Module > ?
i
If you want to use the same code in two projects i recommend to either publish that code as an artifact or push as a git submodule
a
@gts13 you don’t need to copy and past the module, just open your AS and follow the steps that @Naing Aung Luu mentioned and bumm you will have the module on the other project. Also, if you only need to use this module once or twice, I see no really advantages on publishing it to maven repository or something else @Ilya K IMHO
i
yeah it depends on the context, my advise about deploying the library rather applies to modules that will need to be updated over time as in this case it makes sense to keep one source of truth