We are trying to decrease the impact of the jetifier transformation on our CI builds. We are using AndroidX and we upgraded all our code to use the AndroidX packages. We have the jetifier enabled, so all the dependencies we are using, are automatically migrated. Our builds are working fine, both locally and on CI. However, since the switch to AndroidX our CircleCI builds are taking a lot of time, specifically the transformation of AARs. Obviously the jetifier step is work that, until we update any dependency, can be cached so the transformation is not repeated every time, but we are having an hard time doing it.
We tried running the app:assembleOurFlavorDebug
before saving on CircleCI cache, but the transformation is still run on every build.
The save_cache step saves the /gradle
directory and uses the content of some .gradle file as the hash.
We observed 2 consecutive builds, (same cache hash) and both times we noticed that the Jetifier ran on all AARs
We would like to re-use the result of the jetifier transformation for subsequent builds.