https://kotlinlang.org logo
Title
s

scottiedog45

04/10/2019, 6:23 PM
for an android kotlin project, where in the project do you usually put your networking logic? somewhere in the java > project directory?
d

dalexander

04/10/2019, 6:25 PM
Probably under
<project.base.path>.net
and
.net.model
for the data objects I’m expecting to receive from the server.
👍 1
g

ghedeon

04/10/2019, 6:48 PM
that really depends on your architecture, right? Maybe you have some
data
package, maybe it's even a separate module. Maybe that module is so big, that it depends on
net
module...
a

Al Warren

04/10/2019, 7:05 PM
I do clean architecture and package by feature. The only Android network code I have is in
project.base.path.core.platform
. Retrofit services, repositories, etc. all go in
project.base.path.features.<feature name>
. I put non-Android non-feature stuff in individual packages within
project.base.path.core
2