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

26th
Aug 2015
Abel Salgado Romero
@abelsromero
Aug 26 2015 06:09
@rtyler afaik should be enough. I'll keep an eye on it to help you with what I can
the issue is that the internal buffering in gradle is terribly naive
R. Tyler Croy
@rtyler
Aug 26 2015 14:45
@raelik thanks
Blane Dabney
@raelik
Aug 26 2015 14:46
Not sure if anyone on the core team is working on this ATM. I'll probably try to send them a PR to fix this, but I just haven't had time
Schalk W. Cronjé
@ysb33r
Aug 26 2015 19:05
doesn’t sound right to me
Schalk W. Cronjé
@ysb33r
Aug 26 2015 19:11
Have you tried using the classloader on the project itself? i.e. project.class.classloader
R. Tyler Croy
@rtyler
Aug 26 2015 19:28
@ysb33r who/what context are you talking about?
Schalk W. Cronjé
@ysb33r
Aug 26 2015 19:58
@rtyler
the classloader failrues you were seeing earlier
R. Tyler Croy
@rtyler
Aug 26 2015 19:58
you mean the classloader issues that @mkristian was seeing
he's been tinkering with the embedding of jetty not me
Blane Dabney
@raelik
Aug 26 2015 20:22
Hmmm so I realized I put myself in a catch-22 situation with that subproject dependency, and I'm not sure how to resolve it...
oh, think I figured it out.
Schalk W. Cronjé
@ysb33r
Aug 26 2015 20:35
@rtlyler, yip I was referring to what @mkristian was doing
Blane Dabney
@raelik
Aug 26 2015 20:51
Actually, I didn't solve the issue. Just changed it into a different issue
my issue is that one of my dependencies is the jar file built by a subproject
Blane Dabney
@raelik
Aug 26 2015 20:57
this has only been working because at one point it wasn't like that and I was able to build that jar file
Schalk W. Cronjé
@ysb33r
Aug 26 2015 20:57
@raelik Can you use something like
dependencies { 
  compile project(‘:subprojectName’)
}
Blane Dabney
@raelik
Aug 26 2015 20:57
so now I've changed it so that the dependency is just the compile configuration for that project (i.e. its dependencies), and I've added the output classes for that subproject directly into the jrubyJar task
the problem is now that the class files are directly in the jar, class loading breaks because the dependent jar is now in jars/ and has to be loaded by jar-dependencies
This would be a problem for any mixed ruby/java project though
the fact that I've got this in a subproject is fairly irrelevant
the only solution I can see is to completely externalize the subproject and publish it independently from the main project
Blane Dabney
@raelik
Aug 26 2015 21:14
basically, it's like I need to be able to make a configuration dependent on a task
I think I've got a work around. It's kinda ugly, but it works
Blane Dabney
@raelik
Aug 26 2015 21:19
I just need to make sure to do ../gradlew -u uploadArchives in my subproject before running ./gradlew jrubyJar in the root project during a cold deploy
after that, just rebuilding the jar will suffice, as I have my jrubyJar task depending on the subproject's uploadArchives task, which will keep it up to date in the jar
though if I change version numbers in the subproject, it'll probably have to be done twice... gross.