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

add complete example application #7

Open
liblit opened this issue May 24, 2018 · 1 comment
Open

add complete example application #7

liblit opened this issue May 24, 2018 · 1 comment

Comments

@liblit
Copy link

liblit commented May 24, 2018

@ThadHouse, you have been exceptionally helpful in getting me up and running with the Gradle JNI plugin. My simple skeleton application is now a complete working example, including proper management of the shared library in binary distributions. Would you consider adding a complete example like this to the official gradle-jni repository? Perhaps it makes sense to keep the example in a separate repository, but link to that repository from the gradle-jni documentation? I would be happy for you to fork or clone my example for that purpose.

I also welcome any constructive feedback to improve my Gradle style, especially regarding my use of the Gradle software model for native compilation. For example:

  • Is this a good style for setting java.library.path?

  • Is this a good style for including the native shared library in distributions?

  • The above logic should include the library in distributions created using any of three different tasks: installDist, distZip, and distTar. I placed this logic in the startScripts task because that is the one task that installDist, distZip, and distTar all share as a common dependency. But this is a bit awkward, because startScripts itself really does not need to depend on having the shared library already built. Is there a more elegant way to accomplish this goal?

Thank you for any suggestions! I hope that my offer of an instructional example for others partially repays @ThadHouse for all of the help he has given me.

@ghost ghost mentioned this issue Aug 13, 2021
@ghost
Copy link

ghost commented Aug 13, 2021

https://github.com/liblit/simple-jni/blob/master/build.gradle

This file contains system properties.

Will this set up work on Windows, Linux and mac ?

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

1 participant