Coder Social home page Coder Social logo

Comments (14)

ysb33r avatar ysb33r commented on September 6, 2024

To be able to try out the concept today, one can bastardise JRubyExec

task rubyCompile( type : JRubyExec) {
  jrubyArgs '-S', 'jrubyc', '-t', "${buildDir}/classes"
  script 'one.rb'
  scriptArgs 'two.rb','three.rb'
}

We can look at creating a plugin to do this which allows for creating additional tasks to mirror some of the other compile tasks i.e. rubyCompile and rubyTestCompile, which can live in sourceSets such as src/main/ruby and src/test/ruby. Once we do this we are no longer in the realm of trying to build with rake and package, but rather treat ruby as a first class citizen in gradle, like groovy, scala and clojure.

from jruby-gradle-plugin.

mojavelinux avatar mojavelinux commented on September 6, 2024

👍

from jruby-gradle-plugin.

ysb33r avatar ysb33r commented on September 6, 2024

Should we revisit this once JRuby 9.0.0.0 is out?

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

I think this still makes sense to provide, but I would no longer go the route I suggested before.

I think a CompileRuby type task which relies on sourceSets makes a lot of sense for solving this problem. It's not something I think should go strictly into a task

from jruby-gradle-plugin.

mojavelinux avatar mojavelinux commented on September 6, 2024

from jruby-gradle-plugin.

mcandre avatar mcandre commented on September 6, 2024

+1

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

@mojavelinux or @mcandre would this feature request still be interesting to either of you? I'm cleaning up the backlog, and I personally don't have a requirement for this any longer.

from jruby-gradle-plugin.

mojavelinux avatar mojavelinux commented on September 6, 2024

To be honest, I don't remember what the use case was. So I don't have an immediate need for it.

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

Just made a gist for an example in Gitter which kind of does this: https://gist.github.com/rtyler/7635e9c110548882504729ff7445ed0b

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

I think this might be straightforward enough to support. I'm going to bring it in to 2.0 like the over-optimistic sucker I am.

from jruby-gradle-plugin.

ysb33r avatar ysb33r commented on September 6, 2024

I think this a great idea, but let's not rush an implementation. We can do a much better job than the quick gist you did.

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

@ysb33r Since you've certainly got an idea in mind for how this should be implemented, would you like to take it on?

If not, perhaps writing up a specification or something like that would help me understand what a good job might look like here to you

from jruby-gradle-plugin.

ysb33r avatar ysb33r commented on September 6, 2024

This will have to be a joint effort as I'll need to understand more about how the ruby compilation is used in practice.

from jruby-gradle-plugin.

rtyler avatar rtyler commented on September 6, 2024

The two places I believe ahead-of-time compilation are used/useful for are:

  1. Speeding things up at runtime, i.e. avoiding that step at runtime.
  2. Blending Java and Ruby code together in a primarily Java project.

Neither of these are pressing requirements for me personally, but I understand why some people might find them useful 😸

from jruby-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.