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

19th
May 2015
Christian Meier
@mkristian
May 19 2015 00:00
I think gradleTest would allow to use such "big" application to run a test against it.
. . . .but I need to sleep now . . .
R. Tyler Croy
@rtyler
May 19 2015 00:00
@mkristian in the morning will you update the changelog for the jar plugin for 0.2.0?
Christian Meier
@mkristian
May 19 2015 00:01
yes. look through the issues, etc
Schalk W. Cronjé
@ysb33r
May 19 2015 09:28

this might be a little too heavy-weight to run as part of my TDD cycle..

@rtyler Yes, it is meant as a final testing tool in the chain - it is heavyweight

Schalk W. Cronjé
@ysb33r
May 19 2015 09:36

I think gradleTest would allow to use such "big" application to run a test against it.

If you do

dependencies {
  gradleTest ‘my.remote:artefact:1.2.3’
}

then that artifact will be made available to your GradleTests runs in a flat repo. You then just have to say

buildscript {
  dependencies {
    classpath ‘:artefact:1.2.3’
 }
}

OR

dependencies {
  compile ‘:artefact:1.2.3’
}

This allows you to run GradleTest offline.

Christian Meier
@mkristian
May 19 2015 09:40
cool - will add one "big" application to jar-plugin - I really like this
R. Tyler Croy
@rtyler
May 19 2015 14:41
@ysb33r heavyweight might mean something different to you :P when it logs "preparing infrastructure" for many many minutes
@mkristian I'm seeing an issue with what I believe is the jar plugin on a multi-project build:
    at com.github.jrubygradle.jar.JRubyJar.super$8$manifest(JRubyJarTask.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at com.github.jrubygradle.jar.JRubyJar.super$8$manifest(JRubyJarTask.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at com.github.jrubygradle.jar.JRubyJar.super$8$manifest(JRubyJarTask.groovy)
    at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
    at com.github.jrubygradle.jar.JRubyJar.super$8$manifest(JRubyJarTask.groovy)
stack overflow, but not sure how
Schalk W. Cronjé
@ysb33r
May 19 2015 14:43
@rtyler - when it says preparing infrastructure it creates a copy of your gradleTest directory in buildDir for every version of grade you want to test against. It also downloads any versions of Gradle you don’t have, but which you have requested. FInally it will download all additional dependencies you have listed and copy them to a flatDir repo.
@rtyler WHen will you hear whether you are going to Berlin?
R. Tyler Croy
@rtyler
May 19 2015 14:46
@ysb33r it shouldn't be downloading the gradle dists and dependencies every time though should it? those are all cached in `~/.gradle/
@ysb33r I expect to hear sometime in the next 3-4 weeks
Schalk W. Cronjé
@ysb33r
May 19 2015 14:50
@rtyler Correct. It caches them in ~/.gradle or in buildDir itself, depending on how it is configured.
It will also look for them in ~/.gvm/gradle.
So pretty optimised to download as little as possible
R. Tyler Croy
@rtyler
May 19 2015 14:54
then maybe this is just insanely CPU heavy :P
I'll gist you my output when I finish running this thing
R. Tyler Croy
@rtyler
May 19 2015 15:01
still goin :/
Schalk W. Cronjé
@ysb33r
May 19 2015 15:01
Gist me the gradleTest/*/build.gradle as well
just the one
Schalk W. Cronjé
@ysb33r
May 19 2015 15:02
btw @mkristian, that JDK6 issue I told you about last night, goes away with jruby 1.7.20 - so submitted a PR to asciidoctorj today which upgrades to the lastest version of jrubygradle-base and ruby.
R. Tyler Croy
@rtyler
May 19 2015 15:02
woot!
17 minutes to run this does seem a little crazy
see this gist
Schalk W. Cronjé
@ysb33r
May 19 2015 15:07
absolutely!
I left you one optimisation comment on the gist, but that is only to save you bandwidth
R. Tyler Croy
@rtyler
May 19 2015 15:09
the problem I have with that optimisation is that I want this to serve as a self-executing example for users too
which reminds me, does gradleTest set any flags to where in the build.gradle I can tell if we're running under test?
Schalk W. Cronjé
@ysb33r
May 19 2015 15:09
Sure.
currently you cannot set environment etc. I still need to add that.
R. Tyler Croy
@rtyler
May 19 2015 15:11
what's interesting here is that the recent changes from @mkristian appear to be causing my gradleTest on Gradle 2.4 only to fail
@ysb33r I don't need to set the environment, just any flag or environment setting to where I can do something like:
Schalk W. Cronjé
@ysb33r
May 19 2015 15:12
I reckon that is a good thing ...
R. Tyler Croy
@rtyler
May 19 2015 15:12
if (System.env.GRADLE_TEST) { /* use %%VERSION * / } else { /* don't */ }
Schalk W. Cronjé
@ysb33r
May 19 2015 15:13
WHy do you need that?
R. Tyler Croy
@rtyler
May 19 2015 15:14
so I can use this as an example too!
that's invalid under gradleTest
Schalk W. Cronjé
@ysb33r
May 19 2015 15:15
Is this due to the %%VERSION%% token replacement?
R. Tyler Croy
@rtyler
May 19 2015 15:19
yeah
and the groupname
@ysb33r gradleTest doesn't prune distributions or anything like that right?
Schalk W. Cronjé
@ysb33r
May 19 2015 15:20
Nope.
But you need to set the correct group explicitly in your build.grade file. I fell into the same trap yesterday with another new plugin I wrote.
However you might be able to solve your problem by adding a setting.gradle file to your gradleTest/fooTest directory
in there you can set a property, which will be made available to the project, but be invisible to users just reading the build.gradle file
gradleTest creates an empty settings.gradle file for the test if you don’t provide one
R. Tyler Croy
@rtyler
May 19 2015 15:25
not sure I follow what you mean by that
with the new plugins portal, group bullshit, is there any problem just setting the group in my main build.gradle to gradle.plugins.some.bullshit?

with the new plugins portal, group bullshit,

just do group=‘foo.bar’ in your build.gradle

the link was related to solving your other problem. INstead of a setting.grade file, just drop a grade.properties file into your specific gradleTest folder (next to it’s build.grade).
then say systemProp.foo=bar, which means you can do if(System.getProperty(‘foo’)) {} else {} in your build.gradle script.
HTH
Christian Meier
@mkristian
May 19 2015 15:40
@rtyler I can look at the stackoverflow BUT in case your able to point me to gradle multi-project build this would really help. never saw such multi-project build in my short life so far ;)
R. Tyler Croy
@rtyler
May 19 2015 15:48
@mkristian internal chat
@mkristian that said, I don't think this has anything to do with multi-project
I think it's a problem on Gradle 2.4, which I can reproduce with my simple jruby-service example from the SAP
Schalk W. Cronjé
@ysb33r
May 19 2015 15:50
if you downgrade to 2.3 does the problem go away?
R. Tyler Croy
@rtyler
May 19 2015 15:50
I didn't try 2.3, but 2.2 it definitely does
Christian Meier
@mkristian
May 19 2015 15:51
OK gradle-2.4 then ;)
Schalk W. Cronjé
@ysb33r
May 19 2015 15:51
Unfortunately 2.4 is a bit of an enigma, it’s faster in many respects, but it seems to have slowed down in certain use cases
Christian Meier
@mkristian
May 19 2015 16:12
@ysb33r I thought about the initScript and failing when a user tries to set it a second time. currently when setting the initScript then a CopySpec for this script will be added to the Jar task. so a second initScript will just add the second file as well.
not sure what jruby-mains picks to start up then
R. Tyler Croy
@rtyler
May 19 2015 16:24
@mkristian have you been able to reproduce the stackoverflow on 2.4?
Christian Meier
@mkristian
May 19 2015 16:25
give me few minutes to check some "dependencies" graphs . . .
R. Tyler Croy
@rtyler
May 19 2015 16:29
running gradleTest again without 2.4 but with 2..3
I've got plenty of time <_<
Christian Meier
@mkristian
May 19 2015 16:34
be my guest. I look at "meta" coding: changelogs, reademe, etc then
rtyler @rtyler waits impatiently for these tests to finish
Christian Meier
@mkristian
May 19 2015 16:52
I converted my TODOs from the code into jruby-gradle/jruby-gradle-jar-plugin#48 jruby-gradle/jruby-gradle-jar-plugin#49 jruby-gradle/jruby-gradle-jar-plugin#50
R. Tyler Croy
@rtyler
May 19 2015 16:56
thanks
R. Tyler Croy
@rtyler
May 19 2015 17:04
so my changes work just fine on Gradle 2.3, it did take 20 fucking minutes though x_x
Christian Meier
@mkristian
May 19 2015 17:05
is it he gem dependency resolution which takes so much time ?
R. Tyler Croy
@rtyler
May 19 2015 17:05
I have no idea
I'm trying with just a single version of gradle
I think I'm going to commit and release all these changes and just say SAP 0.2.0 doesn't work properly on Gradle 2.4
R. Tyler Croy
@rtyler
May 19 2015 17:12
so a single run with Gradle 2.0 only, and one example in src/gradleTest took 6 minutes
still pretty bananas
Christian Meier
@mkristian
May 19 2015 17:13
are you talking about those gradleTests ? not sure how much time travis needs for those tests !
R. Tyler Croy
@rtyler
May 19 2015 17:13
this is some gradleTest with the service artifact plugin
not playing with the jruby-gradle plugins themselves
Schalk W. Cronjé
@ysb33r
May 19 2015 18:12
A little trick. chdir to the build/gradleTest/2.[01234]/yourTest dir. Then run it with gradle —initscript ../../init.gradle —profile runGradleTest.
R. Tyler Croy
@rtyler
May 19 2015 18:13
lookout/service-artifact-gradle-plugin#26
Schalk W. Cronjé
@ysb33r
May 19 2015 18:13
It will run the actual and drop profiler information, so you can see where in your build all the time is being wasted.
R. Tyler Croy
@rtyler
May 19 2015 18:13
if you're interested in trying to run things really slowly for yourself :P
I'm in the middle of a test run right now, will give that a try ewhen it completes
Schalk W. Cronjé
@ysb33r
May 19 2015 18:14
this will eliminate gradleTest from the equation to a great extent
and focus on your build.gradle file to see where it is wasting time
of course if gradleTest itself is the time waster then you need to run your normal build with —profile
R. Tyler Croy
@rtyler
May 19 2015 18:21
standalone this gradle project just takes 25s fwiw
Schalk W. Cronjé
@ysb33r
May 19 2015 18:26
!!!
R. Tyler Croy
@rtyler
May 19 2015 18:26
yeah
Schalk W. Cronjé
@ysb33r
May 19 2015 18:27
If that PR already merged? Can I this just clone that lookout project and build it?
R. Tyler Croy
@rtyler
May 19 2015 18:29
I don't want to merge it just yet, but I just put some minor changes into the branch to pass the tests
and only run on 2.0 for now
Schalk W. Cronjé
@ysb33r
May 19 2015 18:29
OK so I can still clone and apply the diff from the PR? I would like to see why it runs so slow.
Or maybe you can at least raise an issue against gradleTest.
R. Tyler Croy
@rtyler
May 19 2015 18:30
Schalk W. Cronjé
@ysb33r
May 19 2015 18:33
which jdk are you building with?
R. Tyler Croy
@rtyler
May 19 2015 18:33
7 u65
R. Tyler Croy
@rtyler
May 19 2015 18:41
@ysb33r that branch does pass the test, but it takes a little while :P
Schalk W. Cronjé
@ysb33r
May 19 2015 18:44
mine does not get there. It fails complaining about asciidoctor???
R. Tyler Croy
@rtyler
May 19 2015 18:44
I saw that too, I didn't entirely understand why, asciidoctor is added as a compile time dependency for the plugin
after seeing that I added the latest commit which extends gradleTest from compile
Schalk W. Cronjé
@ysb33r
May 19 2015 18:46
I wouldn’t do that
R. Tyler Croy
@rtyler
May 19 2015 18:48
heh
Schalk W. Cronjé
@ysb33r
May 19 2015 18:51
I know what you wanted to achieve, but I don’t think that is the correct way - I need to check the Gradle docs to see if I’m right about that.
R. Tyler Croy
@rtyler
May 19 2015 18:52
well, whatever seems to be happening in the gradleTest plugin, I don't believe it is correctly resolving the transitive dependencies of my plugin
Schalk W. Cronjé
@ysb33r
May 19 2015 18:52
BTW the asciidoctor ID is wrong - it is org.asciidoctor.convert
R. Tyler Croy
@rtyler
May 19 2015 18:52
lolwut
something should be fucking erroring shouldn't it ? :P
rtyler @rtyler boggles
Schalk W. Cronjé
@ysb33r
May 19 2015 18:53
there was an ID chaneg around 1.5.2 - I think the re-released 1.5.2. with two IDs.
well I’m slightly confused too. It’s not the problem though.
Schalk W. Cronjé
@ysb33r
May 19 2015 19:01
RIght, I figured what is going on - this is a gradleTest-ism.
classpath 'com.github.lookout:service-artifact-plugin:%%VERSION%%’ will be found via flatDir (see init.grade). There is no flatDir dependency information, therefore Gradle does not know it needs asciidoctor i the classpath.
R. Tyler Croy
@rtyler
May 19 2015 19:02
interesting
were you able to reproduce the slowness?
Schalk W. Cronjé
@ysb33r
May 19 2015 19:03
If you add classpath ':asciidoctor-gradle-plugin:1.5.2’ then that problem goes away, but it defats your using the build-script-as-an-example objective.
not there yet, with the slowness, getting it to build first
I don’t have stuff in mavenLocal, like you might have - so not everything resolves in the test
R. Tyler Croy
@rtyler
May 19 2015 19:10
interesting
Schalk W. Cronjé
@ysb33r
May 19 2015 19:10
I’m getting this atm
* What went wrong:
A problem occurred evaluating root project 'jruby'.
> org/eclipse/jgit/errors/RepositoryNotFoundException
R. Tyler Croy
@rtyler
May 19 2015 19:15
O_o
that is supposed to be a transitive from grgit
or wait, sorry misread
Schalk W. Cronjé
@ysb33r
May 19 2015 19:16
worked around it
R. Tyler Croy
@rtyler
May 19 2015 19:16
that's supposed to be caught o_O
Schalk W. Cronjé
@ysb33r
May 19 2015 19:16
interesting use case you are presenting here
R. Tyler Croy
@rtyler
May 19 2015 19:16
hah
rtyler @rtyler is a trouble maker
Schalk W. Cronjé
@ysb33r
May 19 2015 19:16
test is running…
2min
R. Tyler Croy
@rtyler
May 19 2015 19:20
wow
what the hell
Schalk W. Cronjé
@ysb33r
May 19 2015 19:20
normally one would not need everything that is in compile to also be in gradleTest
R. Tyler Croy
@rtyler
May 19 2015 19:20
could my very heavily populated ~/.gradle have anything to do it?
Schalk W. Cronjé
@ysb33r
May 19 2015 19:21
Try replacing jcenter() with mavenCentral() for the time being and check whether you get a speed improvement
jcenter was messed up yesterday
R. Tyler Croy
@rtyler
May 19 2015 19:21
O_o
okay
Schalk W. Cronjé
@ysb33r
May 19 2015 19:23
also I solved the resolving problem by adding a classpath fileTree('../../repo’) line. That was a bit of a hack, but it pretty much stopped a lot of downloading.
not something you want to have in your demo build.gradle file
Maybe I can look into gradleTest creating a local Ivy repo instead of a flat repo. THat should take care of transitive dependencies.
R. Tyler Croy
@rtyler
May 19 2015 19:24
my hope is that I can symlink everything in examples/ into src/gradleTest that way I always have self-testing examples
Schalk W. Cronjé
@ysb33r
May 19 2015 19:25
what you want is asciidoctor examples..
R. Tyler Croy
@rtyler
May 19 2015 19:25
I want it all!
Schalk W. Cronjé
@ysb33r
May 19 2015 19:25
generated docs, with tested code examples

Something like this in your test code

                // tag::CollectionOfFiles[]
                // Assuming we have a task called 'documentBinder'
                documentBinder {

                    setDocuments '/path/to/doc', new File('/path/to/other/doc') // <1>

                    documents '/path/to/doc', new File(' / path / to / other / doc ') // <2>

                    documents project.file('add/other/doc')

                    documents { '/even/add/from/closure' } // <3>
                }
                // end::CollectionOfFiles[]

then in your asciidoc

.Usage
[source,groovy]
----
include::{usagedir}/CollectionOfFilesSpec.groovy[tags=CollectionOfFiles,indent=0]
----
R. Tyler Croy
@rtyler
May 19 2015 19:28
I want that too :)
but that's a bit different than a full on demonstration project like jruby-service/
Schalk W. Cronjé
@ysb33r
May 19 2015 19:38
anyways I cleaned everything out, re-ran it with JDK8 - still ~2min. I don;t have a JDK7 to test with at the moment.
R. Tyler Croy
@rtyler
May 19 2015 19:39
huh
is the gradleTest plugin scanning ~/.gradle/caches or anything like that?
Schalk W. Cronjé
@ysb33r
May 19 2015 19:39
nope
it scans ~/.gradle/wrapper and ~/.gvm/gradle
R. Tyler Croy
@rtyler
May 19 2015 19:40
➜  service-artifact-gradle-plugin git:(cool-wip) ✗ ls -lah ~/.gradle/wrapper/dists 
total 48K
drwxr-xr-x 12 tyler tyler 4.0K May 14 16:24 .
drwxr-xr-x  3 tyler tyler 4.0K Dec 13 09:14 ..
drwxr-xr-x  4 tyler tyler 4.0K Apr 15 11:14 gradle-2.0-all
drwxr-xr-x  4 tyler tyler 4.0K May 12 14:04 gradle-2.0-bin
drwxr-xr-x  3 tyler tyler 4.0K May  6 19:30 gradle-2.1-bin
drwxr-xr-x  3 tyler tyler 4.0K Apr 21 20:28 gradle-2.2.1-all
drwxr-xr-x  3 tyler tyler 4.0K May  6 07:38 gradle-2.2.1-bin
drwxr-xr-x  4 tyler tyler 4.0K May 19 08:15 gradle-2.2-bin
drwxr-xr-x  5 tyler tyler 4.0K Apr 24 15:11 gradle-2.3-all
drwxr-xr-x  4 tyler tyler 4.0K Mar 25 10:04 gradle-2.3-bin
drwxr-xr-x  3 tyler tyler 4.0K May 14 16:24 gradle-2.4-all
drwxr-xr-x  4 tyler tyler 4.0K May 14 15:03 gradle-2.4-bin
➜  service-artifact-gradle-plugin git:(cool-wip) ✗
Schalk W. Cronjé
@ysb33r
May 19 2015 19:41
As I say, it mightbe worthwhile running your build with —profile
you get a nice little report in build/reports/profile
R. Tyler Croy
@rtyler
May 19 2015 19:45
running
R. Tyler Croy
@rtyler
May 19 2015 19:55
heh, iI guess at the top level project this isn't very useful
almost all the execution is in the gradleTest task execution
Schalk W. Cronjé
@ysb33r
May 19 2015 19:56
does it confirm the problem to be specifically in gradleTest or in it’s dependency resolution?
R. Tyler Croy
@rtyler
May 19 2015 19:57
I didn't run this in the build directory, just at the top level project
doing what you said earlier now
@ysb33r can you gist me the local modifications you made?
Schalk W. Cronjé
@ysb33r
May 19 2015 20:07
I added it as a comment to your gist
R. Tyler Croy
@rtyler
May 19 2015 20:09
@ysb33r https://gist.github.com/rtyler/36c3a3be6a58ab6f7f72 how are you executing this locally?
fwiw there are 168 jars in that ../../repo directory for me
oh, i might be derping this up
I should replace the VERSION since I'm running this standalone instead of through the plugin
Schalk W. Cronjé
@ysb33r
May 19 2015 20:12
pushd build/gradleTest/2.0/jruby/
../../../gradlew --initscript ../../init.gradle -i runGradleTest
you don’t run the source file :)
you run the tranformed one in your build directory
R. Tyler Croy
@rtyler
May 19 2015 20:13
yeah yeah :P
rtyler @rtyler is fixing
R. Tyler Croy
@rtyler
May 19 2015 20:14
to generate the transformed one, I have to run a test run once regardless right?
from the plugin, otherwise the stuff in build/gradleTest won't be vlaid right?
Schalk W. Cronjé
@ysb33r
May 19 2015 20:14
you can replace ../../../gradlew to point to any gradle anywhere
indeed
R. Tyler Croy
@rtyler
May 19 2015 20:15
well, gimme another 10 minutes to regenerate =_=
Schalk W. Cronjé
@ysb33r
May 19 2015 20:15
but you can kill the test as soon as you see the second gradle instance kicking off
R. Tyler Croy
@rtyler
May 19 2015 20:16
what version of gradle are you using? 2.2 uses --init-script instead of --initscript
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find com.github.lookout:service-artifact-plugin:0.2.0.
     Searched in the following locations:
         file:/home/tyler/source/github/service-artifact-gradle-plugin/build/gradleTest/repo/service-artifact-plugin-0.2.0.jar
rawr!
Schalk W. Cronjé
@ysb33r
May 19 2015 20:17
sorry it needs to be —init-script
R. Tyler Croy
@rtyler
May 19 2015 20:17
where's it supposed to find the plugin itself, it's not actually in the repo
Schalk W. Cronjé
@ysb33r
May 19 2015 20:19
good question
lemme have a look
From the README: _It is not necessary to add your plugin to the dependencies. The output of the jar task
is automatically added to the gradleTest configuration._
R. Tyler Croy
@rtyler
May 19 2015 20:24
then I'm confused at how the generated script would find the plugin
Schalk W. Cronjé
@ysb33r
May 19 2015 20:24
so it should be there
haha, let me explain
I assume you mean the generated script is the one that was transformed from src/gradleTest into build/gradleTest/2.0
R. Tyler Croy
@rtyler
May 19 2015 20:25
yes
gradleTest task doesn't declare a dependency on the jar task it appears
Schalk W. Cronjé
@ysb33r
May 19 2015 20:28
The gradleTest plugin automatically creates an extension called gradleTest (if it does not exist), which then adds jar as a dependency in the afterEvaluate phase
so the outputs of jar becomes part of the configuration
R. Tyler Croy
@rtyler
May 19 2015 20:29
I'm going to let one gradleTest task run finish before I try to run this example individually with the profile option
since something clearly isn't working properly
@ysb33r I just don't see the jar task getting executed prior to the gradleTest task
Schalk W. Cronjé
@ysb33r
May 19 2015 20:31
It does not, there is no task dependency, just a configuration dependency
R. Tyler Croy
@rtyler
May 19 2015 20:31
so if I haven't run the jar task before hand, how will the gradleTest ever get the jar?
Schalk W. Cronjé
@ysb33r
May 19 2015 20:32
this is by design as I was not sure what kind of use cases would arise and I did not want to cause unncesseary hard dependencies. The hope is that the community would come back with practices and then improvements could be made
It’s in the README.
you need to pass both jar gradleTest if you want the jar to be rebuilt, otherwise gradleTest will run with a previous built version.
Schalk W. Cronjé
@ysb33r
May 19 2015 20:37
there is a step in the gradleTest task which takes all files from the gradleTest configuration and copies them to the repo dir. The initscript then injects a flatDir repo into your transformed build.grade file at runtime.
R. Tyler Croy
@rtyler
May 19 2015 20:37
running again now tha i've made sure the jar was built
Schalk W. Cronjé
@ysb33r
May 19 2015 20:38
Ideally I would want to put the plugin jar on the class path without even any interaction from the plugin author, but I have not been able to get that right - therefore the %%VERSION%% incantation that you need to have.
BTW GradleTest itself is actually tested with GradleTest
It’s the self-referencing plugin trick
R. Tyler Croy
@rtyler
May 19 2015 20:41
jesus
it takes a LONG time to get from the task invocation to actually running the gradle file itself
that sub-gradle invocation
R. Tyler Croy
@rtyler
May 19 2015 20:43
@ysb33r holy shit I think I know why this takes so long
➜  jruby git:(cool-wip) ✗ pwd
/home/tyler/source/github/service-artifact-gradle-plugin/build/gradleTest/2.0/jruby
➜  jruby git:(cool-wip) ✗ du -hcs *
8.0K    bin
965M    build
4.0K    build.gradle
96K    gradle
8.0K    gradlew
4.0K    gradlew.bat
44K    reports
0    settings.gradle
32K    src
965M    total
➜  jruby git:(cool-wip) ✗
anything look off there to you :P
Schalk W. Cronjé
@ysb33r
May 19 2015 20:44
965M !
Christian Meier
@mkristian
May 19 2015 20:44
:)
R. Tyler Croy
@rtyler
May 19 2015 20:44
so it looks like I have a bunch of working state in the build directory
so when the gradleTest plugin copies those src/gradleTest/* directories, it's taking the whole build/ dir with it
Schalk W. Cronjé
@ysb33r
May 19 2015 20:45
yes! It assumes you the plugin author know you’re doing
R. Tyler Croy
@rtyler
May 19 2015 20:46
bad assumption!
Schalk W. Cronjé
@ysb33r
May 19 2015 20:46
hahaha
R. Tyler Croy
@rtyler
May 19 2015 20:46
much faster now!
40s :P
Schalk W. Cronjé
@ysb33r
May 19 2015 20:47
right then, problem solved. Maybe I can get around to JRubyJar tomorrow night
Christian Meier
@mkristian
May 19 2015 20:49
just pushed a small fix for gradle-2.4 problem - should work now
R. Tyler Croy
@rtyler
May 19 2015 20:50
@ysb33r should I need that fileTree statement to stick around in the build.gradle?
@mkristian cool, I'll verify and cut 0.2.1
Christian Meier
@mkristian
May 19 2015 20:51
just tested 2.3 + 2.4
R. Tyler Croy
@rtyler
May 19 2015 20:54
@mkristian did you run the tests? >_>
there's another reason why we like pull requests for everything, master is broken for me now
com.github.jrubygradle.jar.JRubyJarConfiguratorSpec > Checking invalid library config FAILED
    Condition not satisfied:

    e.message == 'can not have mainClass for library'
    | |       |
    | |       false
    | |       126 differences (15% similarity)
    | |       (Could) not (find met)h(od m)a(nif)e(st()) (for argu)m(ents [com.github.jrubygr)a(dle.jar.JRubyJarConf)i(gurator$_mai)nClass(_cl)o(su)r(e2@2dece69e]) (on )r(oot p)r(oject 'test'.)
    | |       (can--) not (--------)h(----)a(v--)e(----) (--------)m(------------------------)a(--------------------)i(------------)nClass( f-)o(--)r(------------) (lib)r(a----)r(y------------)
    | Could not find method manifest() for arguments [com.github.jrubygradle.jar.JRubyJarConfigurator$_mainClass_closure2@2dece69e] on root project 'test'.
    org.gradle.api.internal.MissingMethodException: Could not find method manifest() for arguments [com.github.jrubygradle.jar.JRubyJarConfigurator$_mainClass_closure2@2dece69e] on root project 'test'.
        at com.github.jrubygradle.jar.JRubyJarConfiguratorSpec.Checking invalid library config(JRubyJarConfiguratorSpec.groovy:116)

20 tests completed, 6 failed
:test FAILED
Christian Meier
@mkristian
May 19 2015 20:54
hmm - sorry. will stick to PR the next time
R. Tyler Croy
@rtyler
May 19 2015 20:54
heh
travis is here to help!
just rnuning clean check results in that, I don't think there's anything wrong with my local env
Christian Meier
@mkristian
May 19 2015 20:56
reverted it and see myself
how do I get the "manifest" method into the project for the test project ? apply java plugin ?
R. Tyler Croy
@rtyler
May 19 2015 21:00
I think so
Schalk W. Cronjé
@ysb33r
May 19 2015 21:01
it’s building for me
R. Tyler Croy
@rtyler
May 19 2015 21:01
after he just reverted that latest commit or before @ysb33r ?
Christian Meier
@mkristian
May 19 2015 21:02
if I want to use JRubyJar task then I need to apply the java plugin manually before I can use it. is this right ?
R. Tyler Croy
@rtyler
May 19 2015 21:02
yes
otherwise the 'main' sourceset won't exist
there's some other things that need to be present
Christian Meier
@mkristian
May 19 2015 21:03
expected more automatism ;)
R. Tyler Croy
@rtyler
May 19 2015 21:03
the SAP takes care of some of that
IIRC we already apply java-base in the jar plugin though
Schalk W. Cronjé
@ysb33r
May 19 2015 21:04
after the revert :(
R. Tyler Croy
@rtyler
May 19 2015 21:08
@mkristian that said, I was getting the failures with the existing unit tests
Christian Meier
@mkristian
May 19 2015 21:10
yes, after the change it needs project.manifest() which comes with the java plugin so all tests fail where the project does not have manifest
R. Tyler Croy
@rtyler
May 19 2015 21:10
@ysb33r is there a downside to applying the "full" java plugin?
Christian Meier
@mkristian
May 19 2015 21:11
not sure if this is needed - this test did not even apply any plugin - the JRubyConfiguratorSpec
so my initial question might not be relevant
Schalk W. Cronjé
@ysb33r
May 19 2015 21:17
@rtyler probably not in this context. There was a reason for not doing it at the time, as java-base provided everything we needed.
I think I just said that if someone want to do some development they needed to specify outright which plugin they were going to use.
however, the decision at that time, might no longer be relevant
I don’t feel strongly about it at present
R. Tyler Croy
@rtyler
May 19 2015 21:19
neither do I
Schalk W. Cronjé
@ysb33r
May 19 2015 21:20
I mean, can you think of a situation where you want to build a JAR containing JRuby stuff without needing to do at least a compile somewhere?
R. Tyler Croy
@rtyler
May 19 2015 21:21
in my jruby-service example I'm not :p
Christian Meier
@mkristian
May 19 2015 21:21
yes, loads of ruby application should not need compilation
R. Tyler Croy
@rtyler
May 19 2015 21:22
I think it's fine to include it as an explicitly applied plugin
in the SAP I'll keep applying it and if we change it in the future so be it
Christian Meier
@mkristian
May 19 2015 21:22
and I just removed the apply plugin: 'java' from my "test" build.gradle and it works
R. Tyler Croy
@rtyler
May 19 2015 21:22
not a big deal IMO
wat
Christian Meier
@mkristian
May 19 2015 21:23
sorry - my question really put you guys on the wrong track. apperently the java base plugin provides everything the jruby-gradle-jar-plugin needs
R. Tyler Croy
@rtyler
May 19 2015 21:23
hooray
Christian Meier
@mkristian
May 19 2015 21:24
travis is green - can I merge ?
rtyler @rtyler takes a look
R. Tyler Croy
@rtyler
May 19 2015 21:40
@mkristian alright, released
Christian Meier
@mkristian
May 19 2015 21:41
thanx
R. Tyler Croy
@rtyler
May 19 2015 21:41
now i'm updating the SAP to include it