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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 take the following steps.
  5. 1) Updating gradle dependencies for `application-services`, `android-components`
  6. or `fenix`
  7. The following makefile rules can be used:
  8. make get_gradle_dependencies_list-application-services
  9. make get_gradle_dependencies_list-android-components
  10. make get_gradle_dependencies_list-fenix
  11. which should create the gradle-dependencies-list.txt files in the
  12. corresponding out/$project directory, using nightly's branch.
  13. Note: `android-components` and `fenix` require modified `geckoview` and
  14. `android-components` artifacts to compile successfully. In order to generate the
  15. necessary dependencies for them you need to point to the respective
  16. `android-components` and `fenix` commits our patches are based upon, too, first.
  17. That way the code as Mozilla is shipping it is used for the Gradle dependencies
  18. fetching which should avoid issues caused by broken builds (it is not guaranteed
  19. that all the dependencies are already fetched at the point when the build
  20. breaks). For `fenix` dependencies there is still a manual processing required
  21. afterwards right now as e.g. our tor-android-service related artifacts are not
  22. picked up.
  23. 2) Updating gradle dependencies for `geckoview`, `tor-android-service`
  24. or `tor-onion-proxy-library`
  25. The `geckoview`, `tor-android-service` and `tor-onion-proxy-library`
  26. projects don't have (yet) a makefile rule to generate their
  27. gradle-dependencies-list.txt file, so a few more steps are needed.
  28. For the geckoview project, comment out the following line in the project's
  29. build file:
  30. export GRADLE_MAVEN_REPOSITORIES="file://$gradle_repo"
  31. Also modify the gradle flags to include the debug option so the download logs will show up:
  32. export GRADLE_FLAGS="--no-daemon --debug"
  33. Otherwise, when calling gradle in the project's build script replace the
  34. `--offline` flag with `--debug` and remove any `-Dmaven.repo.local` arguments.
  35. Finally, allow network access during the build by setting
  36. `container/disable_network/build` to `0` in rbm.conf, and rerun the build.
  37. Dependent artifacts will show up as downloads in the logs. You can pull out
  38. these dependencies into a list by passing the log file to the gradle dependency
  39. list script in the projects/common directory:
  40. `projects/common/gen_gradle_deps_file.sh /path/to/log/file`
  41. 3) Copying the resulting `gradle-dependencies-list.txt`
  42. Copy the resulting `gradle-dependencies-list.txt` (from step 1. or 2.)
  43. over the one in the respective project. Then, in the project's config
  44. file, increment the `var/gradle_dependencies_version` and make sure to
  45. restore the project's build file back to original if you modified it.