@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.
@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 thegradle-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
, anddistTar
. I placed this logic in thestartScripts
task because that is the one task thatinstallDist
,distZip
, anddistTar
all share as a common dependency. But this is a bit awkward, becausestartScripts
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.