As I start thinking about cross platform on Mobile, I always find myself approaching the conclusion that because the iOS and Android projects would be sharing code, they are then tightly coupled to each other, and there is a need to start thinking about the separate code bases as a single code base.
I’d love to use the xcode gradle plugin and start to pull in more and more subprojects, but I’ve noticed a problem, that the more sub-projects a gradle project has the longer the gradle configuration stage takes. This would be fine if it were a one time cost, but I seem to have to pay the configuration cost pretty regularly. The gradle daemons seem to not be re-usable a lot of the time, especially when I cancel a running gradle command. In my android project, I have 20 sub modules, and it ends up taking 10-15 seconds for initial configuration for a daemon.
This makes me a little bit hesitant to lean on gradle as the build system to use for cross platform. I’ve noticed that other build systems like bazel or buck seem to be consistently faster, and handle subprojects really well, without it affecting performance nearly as much. That being said, I’m currently reliant on many gradle plugins, and also prefer gradle to any of these other systems.
I thought I’d ask to see if maybe others are experiencing the same trouble with gradle performance that I am, and to see if maybe there were solutions that maybe I’m not taking advantage of currently.
I’m currently on Gradle 3.3