how-to-create-gradle-dependencies-list.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. ### Updating Gradle Dependencies
  2. If additional Android dependencies are required by the project's build, then
  3. the Gradle build will fail due to missing dependencies. To find out what the
  4. missing dependencies are, comment out the following line in the project's build
  5. file:
  6. export GRADLE_MAVEN_REPOSITORIES="file://$rootdir/[% c('input_files_by_name/gradle-dependencies') %]"
  7. then allow network access during the build by setting
  8. var/container/disable_network/build to 0 in rbm.conf, and rerun the build.
  9. Dependent artifacts will show up as downloads in the logs. You can pull out
  10. these dependencies into a list with the following command (replacing
  11. "firefox-android-armv7.log" with the build log file name of the actual project):
  12. `cat logs/firefox-android-armv7.log | grep "Download http" | sed "s/^.*Download //g" > download-urls.txt`
  13. You will then need to add the new dependency URLs and SHA-256 values into the
  14. projects/$project/gradle-dependencies-list.txt file. The format of this file is
  15. pipe delimited
  16. sha256sum | url
  17. Finally, in the project's config file increment the
  18. var/gradle_dependencies_version and make sure to restore the project's build
  19. file back to original.
  20. It may also be the case that you wish to clean up old versions of the artifacts.
  21. For this you will need to run the build with a
  22. gradle-dependencies-list.txt file containing only the headers. Make sure to also
  23. comment the GRADLE_MAVEN_REPOSITORIES line from the project's build file. You
  24. can now proceed to reconstruct the list as given above.