Lock libraries version
Terra
uses dynamic version (Android / iOS) for its libraries, which means Terra
libraries' version will automatically increase when you build app.
This will help deliver libraries' fixes automatically, however it makes your build become irreproducible - which is not preferred especially with deployment builds.
Our suggestion is that for deployment builds, you should lock the libraries' version as following guideline
- Android
- iOS
- Add to your project's
build.gradle
following code
- Add to
settting.gradle
following code
- For every
module
of your android project that useTerra
, rungradle <module>:dependencies --write-locks
to generategradle.lockfile
. The file will be at the root folder of your module and look something like:
- Commit this
gradle.lockfile
to remote repository. Whenever you want to unlock to update new libraries' version, do not increase the version inbuild.gradle
but edit the versions inside this file instead, then refresh the dependencies as:
For more information please refer official document
Your versions lock is already written to
Podfile.lock
, just commit this file to remote repository.Use
pod install --deployment
to prevent libraries' version change.Whenever you want to unlock to update new libraries' version, use the command
pod update <pods_name_separated_by_space>
, this will update versions for the specified pods only.
For more information please refer official document