We basically have a white label app for Android th...
# gradle
b
We basically have a white label app for Android that produces about 40 apps. The build as you can guess is terribly slow and on top of that our modules are poorly organized. But for right now is there a lazy and quick way to fix some of the build time (So when we do the builds on our CI all of those modules are done over and over again): Modules: app - very small app independent home - has all the custom resources for each of the forty+ apps and a majority of the code frescoExt - app independent a fresco extension Networking - app independent player - app independent Is there a way to make all the modules that generate a lib/aar to do it once and the home module just references the lib/aar that those other modules produce? Introducing a repo server is probably not going to be possible, but we do have a github account if that can be used in some way.
We are using kotlin scripting (kts) which is a plus
v
You should probably look into using a remote build cache. So then the CI server that first produces a cacheable task output it can put them there and further executions for the same inputs can then reuse that cache entry.
w
Adding
--scan
to a gradle builds uploads some stats to gradle for viewing. They often come with a handful of tips to improve build performance.
I addition to the remote build cache, which is a great tip, you should make sure you're using a local build cache. That doesn't share cached results with the team, but caches results from one build to the next on the local disk.
w
Parallel build can help if it's not enabled already. Just add these two lines to your project's
gradle.properties
file to enable local caching and parallel execution:
Copy code
org.gradle.parallel=true
org.gradle.caching=true
v
Aaand if you need further tipps, have a look at the channel subject first to find a more appropriate place to ask, as your question actually is off-topic here. 😉