I'm looking into how to improve build times for my...
# android
c
I'm looking into how to improve build times for my teams app using the build analyzer in Android Studio. The latest build was simply a rebuild, without any code changes from the last build. The analyzer output is below. The reason for the task that took the longest time to run is what is confusing me.
Value of input property 'dexParams.minSdkVersion' has changed for task ':app:dexBuilderProdDebug'
I definitely haven't changed minSdkVersion, so I am unsure how this is determined. Any help on how to investigate would be greatly appreciated.
1️⃣ 1
n
This property is injected by android studio based on the target emulator. I recommend running builds using the command line to avoid this issue
👀 1
c
Interesting. Running the same
:app:assembleProdDebug
command via the command line took 11s. That is once I had ran it once to get the daemon up and running. This then leads me to 2 questions : 1. Is there a way to get some command line output similar to the analyzer output? 2. Is there some documentation repo that would give me more insight into dexParams and perhaps the things android Studio does that aren't immediately obvious? Thanks for your response.
n
A build scan is a much more detailed report of what happened during your build. https://scans.gradle.com/
2. Please star this issue: https://issuetracker.google.com/issues/164145066 Please mention that the injected Android Studio properties are causing you to waste time.
1
Thanks for your comment on the issue!
c
No worries. Thank you for your time and help in understanding the problem. Re: build scans I'm not sure that we can use them because some of the build data is made public. If I keep chasing the client then we may get there in the end. Thanks
g
Hey @no, in a scenario where we have remote build cache and most of the developers build the project through AS, do you think it’s worth building on CI with injected properties too?
n
That's a good question. I think it depends on your scenario. I would say run an experiment to see how much time it saves and if it is worth the compute resources.
g
I’ll do that and bring you my results
thank you 1
n
Yes please! I would be very interested to see 🙂