I am considering the best way to deploy a production server using gradle. It is a jruby on rails app that we’re using gradle with in order to integrate it with some shared java code. Another benefit of using gradle for this is not having to worry about working with rbenv or rvm for ruby version management on the deployment server – something I’ve done before which is not always very fun. Running it with gradle lets me treat jruby strictly as java and gets rid of much of the ruby version hassle.
I’m wondering where this line should stop though. Perhaps the role of gradle should be just to setup the environment on the server and then have jruby installed to actually start the rails process (using something like trinidad, perhaps). Though, I’m considering the possibility of just letting gradle do the whole thing and run the trinidad server directly from the gradle process.
Is this a good / bad idea? Has anyone done this before?