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
JavaVM framework with XCode 12.2 / macOS 11.0 #215
Comments
Thanks for the information, I will look at it this week. |
The situation isn't ideal for this particular framework given Apple sort-of free-styled the framework division. JavaVM framework has been deprecated for a long time now but included the important JavaNativeFoundation framework. Subframework is supposed to be an implementation detail of the framework but JavaVM is particular as people were using its subframeworks. In the newer Xcode, JavaVM is gone but JavaNativeFoundation is not a top-level framework. My guess is it should still work if we declare a dependency on Note that JavaVM can be found at There is some work that needs to happen in the system component discovery so I'm unsure if I will spend some time now to add an exception or later. @weisJ Could you see if using a dependency directly on |
This should be the fix for Xcode 12.2 and later: https://github.com/nokeedev/gradle-native/pull/220/files Tell me if that works for you, I will open a different issue around adding special treatment for |
This works for me. Thank you very much!
I myself don't need to build on earlier versions of XCode as the libraries are build using github actions. However if one wishes to build the project locally he might run into problems when using an earlier version of the problem. I don't think that choosing the dependency based on the XCode version would be the best (idiomatic) way to solve the problem. What I think would be a good idea is to have "soft" dependencies which are allowed to be missing. Then one could declare both dependencies as only ever one of both will be available. If no suitable dependency is available it would be nice to have the option for a silent failure (which would just issue a warning and mark the component unbuildable), which would allow for using pre-build libraries as a fallback without a failure. What do you think about this? |
That makes sense, it would be a lenient configuration. Hopefully, I can soon get the ability for adding Gradle configuration from Nokee component directly which will allow you to do exactly that. |
We will continue this work with #221. As explained in this issue, the dependencies changed on the Apple/Xcode side. Using the right coordinate will work without issue. Most of the solutions here can be handled via normal Gradle configuration. The pain point is mostly around synching Gradle configuration with Nokee configuration which will be addressed in another milestone: https://github.com/nokeedev/gradle-native/milestone/13 |
From XCode version 12.2 onwards the framwork set of macOS 11.0 is used, which doesn't include the JavaVM framework.
Of course an installation of the Jdk still should include these files, so a new method to discover the JavaVM framework may be needed.
Relevant stackoverflow question
For now the solution is to stay on XCode 12.1. For github actions this can be easily achieved using this action.
The text was updated successfully, but these errors were encountered: