These are chat archives for jruby-gradle/jruby-gradle-plugin

8th
Mar 2017
Schalk W. Cronjé
@ysb33r
Mar 08 2017 06:29
@rtyler yes. Working on volume 2.
Andrew Wheeler
@andrew-wheeler
Mar 08 2017 18:38
Hi folks, I am working on a jRuby project and I would like to package a local gem (jruby source code) as a .jar file. I have done this successfully using the warbler gem, but I was wondering if there is a way to do that using the jruby-gradle plugin. As it is, I am using a jrubyExec task to run the warble script, but that is obviously not ideal.
R. Tyler Croy
@rtyler
Mar 08 2017 18:44
it depends on how you intend to use the "packaged" gem from the jar file
if the jar file is just for stuffing code into, or if you expect to use the jar file from a java project and load an embedded jruby runtime
Andrew Wheeler
@andrew-wheeler
Mar 08 2017 18:47
Thanks! I intend to use something like 'java -cp ... JarMain' with JarMain defined in the jar from a script, but if there is a better way I'm open to it. The reason I want to do that is I have a jar from an external party that needs to be on the classpath.
Blane Dabney
@raelik
Mar 08 2017 19:24
I'm currently using gradle to build artifact jars that contain just jRuby and all of my gem and jar dependencies.
My actual Ruby code sits on the filesystem.
then I have one wrapper script that uses java with the artifact jar as the classpath to run jruby for a specific .rb file, and another that runs jruby with the -S parameter to run gem scripts (e.g. irb, rspec, puma, etc)