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

22nd
Oct 2014
R. Tyler Croy
@rtyler
Oct 22 2014 15:55
Had dinner with Hans last night, lots of good things coming down the pipe from Gradleware on dependency management getting cleaned up
R. Tyler Croy
@rtyler
Oct 22 2014 17:02
redstorm.jar published, now to wait for the jcenter link
Schalk W. Cronjé
@ysb33r
Oct 22 2014 17:03
Great
R. Tyler Croy
@rtyler
Oct 22 2014 17:03
following the jar plugin's lead with refactoring the storm plugin
just learned what @PackageScope is
Schalk W. Cronjé
@ysb33r
Oct 22 2014 17:08
Very useful for testing :)
R. Tyler Croy
@rtyler
Oct 22 2014 17:53
I'm kind of hacking the shit out of this storm plugin, I might need your help cleaning it up later @ysb33r
my first priority is to unblock some work at Lookout
Schalk W. Cronjé
@ysb33r
Oct 22 2014 18:19
:)
R. Tyler Croy
@rtyler
Oct 22 2014 18:45
@ysb33r if I subclass JavaExec
can I call from the gradle code: myTask.setClasspath
where mytask(type: SubJavaExec)
or are there visibility concerns on those methods from the superclass that I'm not aware of
R. Tyler Croy
@rtyler
Oct 22 2014 18:54
woot, redstorm.jar is now in jcenter
R. Tyler Croy
@rtyler
Oct 22 2014 20:24
cutting release of storm plugin, YAY
Schalk W. Cronjé
@ysb33r
Oct 22 2014 20:45
Yes, you can subclass. What you cannot do is change the @TaskAction, but you can @Override the action method, which IIRC is called exec
What is more tricky is to inject behaviour into an existing task action, when you don’t want to subclass. (Anyhow that was not your question)
I need to figure out whether how the jrubyStorm configuration should work
@ysb33r for whatever reason calling setClasspath was not working properly, but classpath did
Schalk W. Cronjé
@ysb33r
Oct 22 2014 20:50
Just remember that with JRubyExec you cannot use args.
R. Tyler Croy
@rtyler
Oct 22 2014 20:50
I'm subclassing JavaExec directly
it's not something that runs through JRubyExec
Schalk W. Cronjé
@ysb33r
Oct 22 2014 20:51
there is a difference between classpath and setClassPath. The former appends, the latter replaces.
R. Tyler Croy
@rtyler
Oct 22 2014 20:51
hrm, interesting
Schalk W. Cronjé
@ysb33r
Oct 22 2014 20:53
What do you need me to look at?
R. Tyler Croy
@rtyler
Oct 22 2014 20:53
notihng, was just pointing you at the code
I'm sure I'm fucking up the API
R. Tyler Croy
@rtyler
Oct 22 2014 21:00
I "get" jar and how it fits together, I just have trouble thinking in a way that leads to good gradle code still :P
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:01
probably are, but that is a good learning exercise :)
I would suggest for storm that you don’t use args to pass the script name. Make it an explicit property, then add it to args when exec is called.
That gives you a more semantically expressive DSL
R. Tyler Croy
@rtyler
Oct 22 2014 21:02
rightyo, it also makes more sense to have topology which is a single string
since that's what I need anyways
just:
@Input
String topology
right?
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:05
That is a good start.
If you need more flexibility you can make it Object, and then usen stringitize later on. (There are examples in the codebase)
rtyler @rtyler nods
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:06
The only thing with properties is that the force you to do assignment, or if you want to use method style, then need to use setXXX.
R. Tyler Croy
@rtyler
Oct 22 2014 21:07
task localHelloWorld(type: JRubyStormLocal) {
    topology 'topologies/hello_world_topology'
}
that seems to work just fine with the @Input?
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:08
THat is wht many times I rather hides the fields as private/`@PackageScopeand just use a method with the same name. I then compliment it with agetXXXmethod with is annotated with@Input` or similar. I find it gives me a more readable DSL
I am surprised that works without assignment
R. Tyler Croy
@rtyler
Oct 22 2014 21:08
I wonder if it's something bfixed in 2.1?
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:09
Maybe...
R. Tyler Croy
@rtyler
Oct 22 2014 21:09
refreshing dependencies to make sure that this really works :P
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:09
I suggest compiling plugins with against 2.0 - better compatibility
BTW I am submitted a proposal for Greach 2015 on this colleciton of plugins
R. Tyler Croy
@rtyler
Oct 22 2014 21:10
is that something you can specify in gradleApi()?
can you send me your proposal? I'd love to read it
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:10
I’ll send you the slides when they are done :)
R. Tyler Croy
@rtyler
Oct 22 2014 21:11
when will you know if you're proposal is accepted?
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:11
BTW the version of gardle that use to build the plugin with, will determine the compatibility.
It happens indirectly through gradleApi.
R. Tyler Croy
@rtyler
Oct 22 2014 21:11
for a configuration like jrubyJar, how can I generate a path for jruby-gradle/jruby-gradle-storm-plugin#1?
I know we have helpers in GemUtils
but AFAICT that's not a "public api"
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:12
I think they only let one know early next year. I am doing the slides anyway, because I want to submit one for some other conferences too
No, GemUtils was not intended to be public.
at least not for direct usage within build scripts.
R. Tyler Croy
@rtyler
Oct 22 2014 21:13
this would be within the storm plugin
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:13
If people want to use it for writing more plugins, no problemo
R. Tyler Croy
@rtyler
Oct 22 2014 21:17
greach looks cool
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:18
Great conference. No fuss, no frills, just a bunch of great people
R. Tyler Croy
@rtyler
Oct 22 2014 21:19
and how about FOSDEM? comin'?
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:21
As I said before, there is a good chance I’ll be down in Johannesburg over that time, but I might just be in the UK by the time you get to London.
R. Tyler Croy
@rtyler
Oct 22 2014 21:22
ah right
I'll be definitely traveling through London if Lookout pays for my ticket
visit our london office, improve morale
Schalk W. Cronjé
@ysb33r
Oct 22 2014 21:22
your morale or theirs?
R. Tyler Croy
@rtyler
Oct 22 2014 21:22
more theirs, I'll be on my way to FOSDEM
that's the high point of the year for me sometimes :P
R. Tyler Croy
@rtyler
Oct 22 2014 22:53
man this is too cool having a storm plugin
Schalk W. Cronjé
@ysb33r
Oct 22 2014 22:54
I just googled for Ruby Storm and I got "Ruby Storm, Author of Sensual Romance” !
R. Tyler Croy
@rtyler
Oct 22 2014 22:54
awww yeah