jruby-gradle / jruby-gradle-plugin

A Gradle plugin for working with JRuby projects for fun and profit. Mostly profit.
http://jruby-gradle.org
Other
92 stars 41 forks source link

jrubyPrepare doesn't refresh dependencies after initial setup #288

Open fapdash opened 7 years ago

fapdash commented 7 years ago

Reproduction:

  1. Clone https://github.com/asciidoctor/asciidoctor-gradle-examples

  2. In '/asciidoc-diagram-to-html-example' run

    ./gradlew jrubyPrepare
    [...]
    :asciidoc-diagram-to-html-example:jrubyPrepare
    Download https://jcenter.bintray.com/org/jruby/jruby-complete/9.0.5.0/jruby-complete-9.0.5.0.pom
    Download https://jcenter.bintray.com/org/jruby/jruby-complete/9.0.5.0/jruby-complete-9.0.5.0.jar
    Download http://rubygems.lasagna.io/proxy/maven/releases/rubygems/asciidoctor-diagram/1.4.0/asciidoctor-diagram-1.4.0.pom
    Download http://rubygems.lasagna.io/proxy/maven/releases/rubygems/asciidoctor/1.5.5/asciidoctor-1.5.5.pom
    Download http://rubygems.lasagna.io/proxy/maven/releases/rubygems/asciidoctor-diagram/1.4.0/asciidoctor-diagram-1.4.0.gem
    Download http://rubygems.lasagna.io/proxy/maven/releases/rubygems/asciidoctor/1.5.5/asciidoctor-1.5.5.gem
    Successfully installed asciidoctor-diagram-1.4.0
    Successfully installed asciidoctor-1.5.5
    2 gems installed
  3. Change https://github.com/asciidoctor/asciidoctor-gradle-examples/blob/master/asciidoc-diagram-to-html-example/build.gradle#L12 to gems 'rubygems:asciidoctor-diagram:1.5.2' and save

  4. Run

    
    ./gradlew jrubyPrepare
    :asciidoc-diagram-to-html-example:jrubyPrepare UP-TO-DATE

BUILD SUCCESSFUL



I checked my gradle cache and there is still only version 1.4.0.
The same thing happens when I change the dependency to a different gem or add another gem.

Edit: I tested this on a second machine now and got the same behaviour.
If I rename the project folder jrubyPrepare() recognizes the changed dependencies and installs them.
rtyler commented 5 years ago

This is definitely an annoying paper cut.

This is something I would like to try to fix towards 2.0. I think the issue relies on how we're mapping the output files for the task, but will have to dig a little deeper here.

paulk-asert commented 3 years ago

+1