Opened 8 months ago

Last modified 4 months ago

#33556 assigned task

Add TBB project for android-components

Reported by: sisbell Owned by: gk
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile, tbb-rbm, GeorgKoppen202006, TorBrowserTeam202006, gitlab-tb-tor-browser-build
Cc: tbb-team, sysrqb, boklm Actual Points:
Parent ID: #33184 Points:
Reviewer: sysrqb Sponsor: Sponsor58-must

Description

Contains dependent libraries of Fenix

Source: https://github.com/mozilla-mobile/android-components

Child Tickets

Change History (14)

comment:1 Changed 8 months ago by sisbell

This one is not complete so its more of a preview. This works with network turned on. Its a work in progress for network turned off.

Some problems I detected, mostly around changes to local repos

  • Setting of the local maven repo is not working with gradle 5.6.x: -Dmaven.repo.local=$gradle_repo
  • There are a couple of dozen downloads that the build tries to download but they are all 404 (from same repo). This doesn't appear to affect the build.
  • Customs Gradle Plugins need a different repo location than the rest of the build. I've managed to get one of the plugins poiting to the correct local repo but having trouble with the second one.

On the plus side, the parsing of the logs for dependencies works without needing any changes.

So the way this works is that we build all the components into an aar and the invoke the gradle task publishToMavenLocal

This will publish to a local repo that the build then packages up to be used by fenix.

https://github.com/sisbell/tor-browser-build/commits/bug-33556

comment:2 Changed 8 months ago by sisbell

android-components build pulls the git hash and adds it as meta-data to the aar. The git.patch removes this feature. This is necessary since the build doesn't have the git meta-data included. Without the patch the build fails.

comment:4 Changed 7 months ago by sisbell

Cc: eighthave removed
Status: newneeds_review

Made the following changes

Remove projects that we don't need from .buildconfig.yml

Push Related

  • concept-push
  • feature-accounts-push
  • feature-push
  • lib-push-amazon
  • lib-push-firebase

Accounts

  • feature-accounts
  • service-firefox-accounts

Synch

  • feature-syncedtabs
  • browser-storage-sync
  • service-sync-logins

Glean/Telemetry

  • service-glean
  • support-sync-telemetry

Rust

  • support-rustlog
  • support-rusthttp

Crash Reporting

  • lib-crash - (feature-push and service-firefox-accounts both depend on this, since they are removed we can remove this project)

Miscs

  • service-experiments
  • support-migration (may need this)
  • support-test-appservices (removing all appservices components)
  • all sample projects

Add mavenLocal() in build configs to reference local repo

Use legacy setup for plugins so that they can find plugin artifact in local maven repo

Since we are removing glean/telemetry support

  • Remove glean plugin references from gradle build files
  • Remove glean GekoAdapter.kt from builds.

Add @aar to dependency references. The build is not finding these library artifacts locally without specifying type It looks for them as a jar)

Remove use of git plugin. This is used to embed the hash in the meta-data, which we don't want to do

TODOs:

  1. leftover change to rustlog version in path to remove
  1. The local maven repo section in the command line doesn't work correctly anymore. I had to copy artifacts to the standard .m2 repo. This needs investigation
  1. Plugin Management section I added in settings.gradle doesn't do anything. This requires patching as a legacy plugin. Needs investigation.?
  1. The gradle-depenency file is outdated. It may not need everything in with the latest removal of projects from the .buildconfig.yml file. I'll need to regenerate it.
  1. We have variants for production, beta and nightly builds. These should be configurable based on the rbm build (currently fenix only supports using beta and nightly build, so only uses the respective variants of android-components, meaning it doesn't use android-components production artifacts)Le

Latest commit is here

https://github.com/sisbell/tor-browser-build/commits/bug-33556b

comment:5 Changed 7 months ago by pili

Sponsor: Sponsor58-must

Adding sponsor to tickets

comment:6 Changed 7 months ago by sisbell

Some additional changes needed are to have this project depend on a TBBGeckoView? project that we build, rather than downloading geckoview from the repo.

comment:7 Changed 7 months ago by gk

Keywords: TorBrowserTeam202004R added

comment:8 Changed 6 months ago by gk

Keywords: tbb-rbm added; Android removed
Reviewer: gk
Type: defecttask

sisbell: Do you have an update for that bug somewhere (the old review request is 5 weeks old and there were open questions) or should I still look at bug_33556b?

comment:9 Changed 6 months ago by gk

Keywords: TorBrowserTeam202005 added; TorBrowserTeam202004R removed
Status: needs_reviewneeds_revision

comment:10 Changed 5 months ago by gk

Cc: tbb-team added
Keywords: GeorgKoppen202005 added
Owner: changed from tbb-team to gk
Reviewer: gksysrqb
Status: needs_revisionassigned

comment:11 Changed 5 months ago by gk

So, this has been a big PITA and I found another .jar file was missing. I am still not sure why. But I added both "by hand" to be able to work on the integration of your custom geckoview further. bug_33556_v4 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/log/?h=bug_33556_v4) is what I am currently using for that.

comment:12 Changed 5 months ago by gk

Keywords: GeorgKoppen202006 added; GeorgKoppen202005 removed

Moving my tickets.

comment:13 Changed 5 months ago by gk

Keywords: TorBrowserTeam202006 added; TorBrowserTeam202005 removed

Moving tickets to June.

comment:14 Changed 4 months ago by gk

Keywords: gitlab-tb-tor-browser-build added

Add magic gitlab keyword.

Note: See TracTickets for help on using tickets.