I have a question that might be a bit “off” for th...
# android-studio
m
I have a question that might be a bit “off” for this channel, but I can’t find a better place. If I have one Android project and one Intellij (server) project, how can I setup one shared module for data objects between these project? All information I found so far points to that all modules for a project has to be in the same parent folder..
k
I know that in Android, you can add a module in the settings.gradle file that points to a directory outside of the current one. Not too sure about the Intellij project. What type is it? (Gradle based?)
m
It's grade based. Do you have a link to a guide or example?
k
I do not, but my Android projects share modules outside of a root folder as do my Java Swing projects
Something like this in the settings file:
Copy code
include ':kotlinUtils'
project(':kotlinUtils').projectDir = new File('../kotlinUtilsX')
m
Out with the dog right now, but I'll test as soon as I'm back
The
kotlinUtilsX
should be a full project I assume (not just another projects single module folder)
k
I would imagine you would want to point to the module and not an app (but it would be a project)
m
it doesn’t complain, but the classes cant be found either.
It feel strange that this isn’t a more popular question. If you make a server (intellij) and a client (android), having a shared project with all DataTransferObjects would be beneficial, especially during early development when things can change alot. (and no, i did not get it to work 😉 )