Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jitsi-meet-sdk without google play service dependencies #4106

Closed
Bubu opened this issue Apr 16, 2019 · 22 comments
Closed

Jitsi-meet-sdk without google play service dependencies #4106

Bubu opened this issue Apr 16, 2019 · 22 comments

Comments

@Bubu
Copy link

Bubu commented Apr 16, 2019

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

@Bubu Bubu changed the title Jitsi-meet-sdk without google play servcie dependencies Jitsi-meet-sdk without google play service dependencies Apr 16, 2019
@Bubu
Copy link
Author

Bubu commented Apr 16, 2019

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.

@saghul
Copy link
Member

saghul commented Apr 17, 2019

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:

.addPackage(new co.apptailor.googlesignin.RNGoogleSigninPackage())
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.

@saghul
Copy link
Member

saghul commented Apr 30, 2019

@Bubu Hi there. I found some time today and started working on this. Any chance you can give this branch a go? #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.

@Bubu
Copy link
Author

Bubu commented May 1, 2019

Awesome, I will try that!

@cromulentbanana
Copy link

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

@Bubu
Copy link
Author

Bubu commented May 17, 2019

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.

@saghul
Copy link
Member

saghul commented May 17, 2019

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

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

@Bubu
Copy link
Author

Bubu commented May 17, 2019

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 #4225?

@saghul
Copy link
Member

saghul commented May 17, 2019

Ah, i must have missed that. Will fix.

@saghul
Copy link
Member

saghul commented May 17, 2019

@Bubu can you please try this patch? #4233

@Bubu
Copy link
Author

Bubu commented May 20, 2019

@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

@saghul
Copy link
Member

saghul commented May 20, 2019

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.

@Bubu
Copy link
Author

Bubu commented May 20, 2019

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

@saghul
Copy link
Member

saghul commented May 20, 2019

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

@pihug12
Copy link

pihug12 commented Jun 19, 2019

@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

@saghul
Copy link
Member

saghul commented Jun 20, 2019

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

@dgtlmoon
Copy link

@saghul any chance of a new release? :)

@saghul
Copy link
Member

saghul commented Jun 28, 2019

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!

@licaon-kter
Copy link
Contributor

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

@richardmartus
Copy link

Is it possible for jitsi to use API 19?

@saghul
Copy link
Member

saghul commented Nov 26, 2020

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

@saghul
Copy link
Member

saghul commented Nov 26, 2020

@richardmartus No, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants