Jitsi-meet: Jitsi-meet-sdk without google play service dependencies

Created on 16 Apr 2019  路  22Comments  路  Source: jitsi/jitsi-meet

As mentioned here I'm trying to build riot-android without using https://github.com/jitsi/jitsi-maven-repository.

I'm currently blocked by a runtime crash java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/SignInButton; which I think the react-native-google-signin module tries to bring in.

As this is (afaik) a google proprietary library we can't include it in any software built for f-droid release.

Is there a way to not require any proprietary libraries for jitsi-meet? Or am I completely missing something here?

CC @saghul

Most helpful comment

As a matter of fact, yes :-) We just released SDK 2.2.0! Release notes here: https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md#220-2019-06-28

I'll close this then. If there is anything we missed please open a new issue and we'll take care of it!

All 22 comments

I also just confirmed that riot-android built "normally" (using the jitsi maven repo) does include a whole lot of com.google.gms.* classes in the final apk :-(

Edit: that is with the Appfdroid flavour, that intentionally disables all first-party dependencies on gms.

Hi @Bubu , thanks for raising this.

We also want to eventually push Jitsi Meet to F-Droid, so reporting all these issues helps, please keep them coming!

Now, this dependency comes from our use of https://github.com/react-native-community/react-native-google-signin Which we use to sign in users for YouTube streaming.

I'd be open to a patch which skips this package: https://github.com/jitsi/jitsi-meet/blob/c1f8a351565efd1b4b659277cbf32a6907835bb6/android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java#L136 based on a build-time flag. The JS code would need to be adjusted to make sure we don't try to access stuff from that module too.

While we have no time to work on this at the moment, I will help anyone who wants to get started and write a patch.

@Bubu Hi there. I found some time today and started working on this. Any chance you can give this branch a go? https://github.com/jitsi/jitsi-meet/pull/4155

You'll need to build the SDK yourself with the LIBRE_BUILD env var set to true and all analytics and Google Play Serices dependencies (hopefully I caught them all) will be removed / non-functional.

Awesome, I will try that!

@Bubu can this be closed since #4155 was merged in?

I tried following the guide here, building my own libre sdk version: https://github.com/jitsi/jitsi-meet/tree/master/android#build-and-use-your-own-sdk-artifactsbinaries

Somehow a dependency is not pushed to the local maven repo?

   > Could not find com.facebook.react:@react-native-community_async-storage:unspecified.

Are you using the release-sdk.sh script for publishing dependencies to a local maven repo?

Otherwise no, we haven鈥檛 pushed a new SDK version yet, and this dependency is new.

Are you using the release-sdk.sh script for publishing dependencies to a local maven repo?

yes.

edit: That particular reacti-native subproject doesn;t seem to have a publish gradle task. Maybe that's the problem?

Possible the same problem as https://github.com/jitsi/jitsi-meet/issues/4225?

Ah, i must have missed that. Will fix.

@Bubu can you please try this patch? https://github.com/jitsi/jitsi-meet/pull/4233

@saghul Thanks for your quick fix! This seems to get me further, but the next problem I'm struggling with is that com.facebook.react:react-native-community-async-storage seems to bump minsdk version from 16 to 21. Is this expected?

riot-android/vector/src/appfdroid/AndroidManifest.xml:111:5-315 Error:
        uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native-community-async-storage:1.3.4-jitsi-1204566] /home/mhoffmann/.gradle/caches/transforms-1/files-1.1/react-native-community-async-storage-1.3.4-jitsi-1204566.aar/529d81819a4fb8e2fffdd0c569e4d5c7/AndroidManifest.xml as the library might be using APIs not available in 16

Hum. Yes and no. Our minSdk is 19, so 16 is not going to work, but 21 shouldn't be there. I'll check upstream.

Scratch that, I was confused. Our API level is 21, so that's correct. The library reads it from the project, and I guess you see it complain there first because it's a alphabetically the first or something.

See: https://github.com/jitsi/jitsi-meet/blob/master/android/build.gradle#L152 we moved to API 21 almost a year ago, as supporting Android 4 devices is just too hard at this point.

Alright, I'll have to dig in later why this error is now thrown with my build then.

@Bubu FYI, #4233 landed, so you can test master without needing to apply the patch now.

@saghul Is there a milestone for the next android-sdk tag ? I think some projects are waiting for this to ship their releases without the GMS dependencies.

The last one seems to be: https://github.com/jitsi/jitsi-meet/releases/tag/android-sdk-2.1.0

@pihug12 I was hoping to make a release this week but it will slip onto next week.

@saghul any chance of a new release? :)

As a matter of fact, yes :-) We just released SDK 2.2.0! Release notes here: https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md#220-2019-06-28

I'll close this then. If there is anything we missed please open a new issue and we'll take care of it!

Any chance to host a LIBRE_BUILD in your own maven @saghul ?

Else more and more maven repos pop-up for each project that wants to use the SDK and be fully open-source, not to mention failing to update it timely and so on.

Ref: https://github.com/RocketChat/jitsi-maven-repository
Ref: https://github.com/vector-im/jitsi_libre_maven

Is it possible for jitsi to use API 19?

@licaon-kter I don't know. We are already spreading ourselves pretty thin.

@richardmartus No, sorry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TopheC picture TopheC  路  3Comments

galvaniccoffee picture galvaniccoffee  路  3Comments

mdosch picture mdosch  路  3Comments

dantman picture dantman  路  3Comments

ralgozino picture ralgozino  路  3Comments