`browser-engine-gecko` has proprietary transitive dependencies and pulls Google Play Services into apps that shouldn't ship it
I'm trying to build a project (really a Fenix derivative) that uses org.mozilla.components:browser-engine-gecko, and also doesn't ship any proprietary class files in the build. I definitely don't want to ship the proprietary Google Play Services client libraries, which spook the oddly large category of people who consider Google untrustworthy but run AOSP-derived operating systems. Moreover, I need to be able to grant people full modification, reverse-engineering, etc. rights to the binaries, and that's probably illegal if they ship code under whatever license Google Play Services uses.
But my dependency tree looks like this:
+--- org.mozilla.components:browser-engine-gecko:96.0.15
| +--- org.mozilla.geckoview:geckoview-omni:96.0.20220126154723
| | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20 -> 1.5.31
| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 (*)
| | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 (*)
| | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
| | +--- androidx.legacy:legacy-support-v4:1.0.0
...
| | +--- com.google.android.gms:play-services-fido:18.1.0
| | | +--- com.google.android.gms:play-services-base:17.0.0
| | | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | | | +--- androidx.core:core:1.0.0 -> 1.5.0 (*)
| | | | +--- androidx.fragment:fragment:1.0.0 -> 1.3.4 (*)
| | | | +--- com.google.android.gms:play-services-basement:17.0.0
| | | | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
| | | | | +--- androidx.core:core:1.0.0 -> 1.5.0 (*)
| | | | | \--- androidx.fragment:fragment:1.0.0 -> 1.3.4 (*)
| | | | \--- com.google.android.gms:play-services-tasks:17.0.0
| | | | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
I would have suspected #9508 of causing this, since the library is there for 2-factor authentication. But it looks to me like this might have actually happened in https://github.com/mozilla-mobile/android-components/commit/0b349f48c91a50bb7b4ffbf40c6c122ed18142d3, which swapped over to the -omni version of geckoview (which I guess means the one that ships closed-source dependencies?).
Is there an OSS-only flavor of browser-engine-gecko that I should be depending on instead? Or is the com.google.android.gms:play-services-fido dependency actually somehow optional? How can I avoid shipping it?
┆Issue is synchronized with this Jira Task
But it looks to me like this might have actually happened in https://github.com/mozilla-mobile/android-components/commit/0b349f48c91a50bb7b4ffbf40c6c122ed18142d3, which swapped over to the -omni version of geckoview (which I guess means the one that ships closed-source dependencies?).
The -omni dependency of GeckoView ships extra dependencies like Glean but it's not closed source, everything is publicly available at https://hg.mozilla.org/mozilla-central/
So are com.google.android.gms:play-services-fido and the core Google Play Services client libraries it pulls in actually open source? If I managed to clone the whole Mozilla Central repository, would I find the sources vendored in there?
Or do you mean that all the code in org.mozilla.geckoview:geckoview-omni itself is open source (including Glean), but it still can have dependencies on closed-source libraries like com.google.android.gms:play-services-fido that need to be obtained from elsewhere?
Or do you mean that all the code in org.mozilla.geckoview:geckoview-omni itself is open source (including Glean), but it still can have dependencies on closed-source libraries like com.google.android.gms:play-services-fido that need to be obtained from elsewhere?
Correct, GeckoView itself and all Mozilla projects that it depends on are open source but we have third-party dependency that might not be like gms.
From what I can see gms is only used for WebAuthn support: https://searchfox.org/mozilla-central/search?q=com.google.android.gms&path= so you might get away with excluding the dependency. If you're willing to contribute to the project I could mentor you (or any other person interested) into fixing fallout bugs from such a change.
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1794913
Change performed by the Move to Bugzilla add-on.