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

Comment out requires to android native modules #831

Merged
merged 2 commits into from
Dec 24, 2019

Conversation

HGuillemet
Copy link
Collaborator

Android expects the native library to be installed in /lib/<abi> directory.
That's why in the jars of native libraries the libraries are in /lib/<abi> instead of the /org/bytedeco/<presets>/<system>-<abi>/ path used for other platforms.
So when using JPMS and bringing in the module graph the native jars of multiple presets for android, files in directory /lib/<abi> are present in multiple modules, leading to a split package exception.
Note that this only happens :

  • when using JPMS (so not on Android since Android doesn't support JPMS yet)
  • when bringing the native jars for android and for an abi not containing a - into the module graph (problably using some requires org.bytedeco.<preset>.platform in the application module-info.java). Since directories with a - are not considered java packages.

This PR solves this problem by removing the dependencies of platform modules towards android native modules, so that the android native modules are never brought into the module graph when using the platform modules.
This shouldn't have side effects as long as Android doesn't support JPMS.

See Issue 814

@saudet saudet merged commit d267926 into bytedeco:master Dec 24, 2019
@HGuillemet HGuillemet deleted the hg_no_android_requires branch December 24, 2019 14:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants