-
Notifications
You must be signed in to change notification settings - Fork 64
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
How to fetch the jni libs with gradle #23
Comments
+1 @thelsing in maven repository exists old native libs. I'm trying build webrtc, but it fails again and again. @devopvoid lib can more usable if native libs will be include with java part of it. |
the platform specific libraries are all uploaded to the Maven central repository (listing). If you include the webrtc-java artifact in your project, it will add the platform specific dependency that includes the native library. But you can include these native library dependencies yourself by providing the platform classifier ( Hope it helps. |
My suspicion here is that probably your Java module setup is not loading the native library. The first step would be to investigate the dependency tree in your IDE and see if the platform specific jar is included. |
Thank you for the fast reply. After reading https://medium.com/nerd-for-tech/gradle-managing-scope-and-platform-specific-dependencies-5384d6d8ac52 I'm not sure if gradle should pull the correct platform specifc jar automatically. It works now with:
Maybe this helps someone else. |
Note that you also need to include the osdetector plugin. I propose an alternative:
This gist doesn't require an external plugin and guarantees consistent dependency versions. Just edit the |
Describe the bug
Currently the gradle dependency
implementation 'dev.onvoid.webrtc:webrtc-java:0.3.0'
only fetches the java lib. How do I fetch the platform specific ones too?
Could you publish them in maven central separately please?
Or maybe there is some gradle option that fetches all artifacts?
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: