Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I should be able to override jruby.defaultVersion or execVersion from the command line #131

Closed
rtyler opened this issue Jun 8, 2015 · 8 comments

Comments

@rtyler
Copy link
Member

@rtyler rtyler commented Jun 8, 2015

This would be great for testing newer version of JRuby with existing builds, e.g.

% ./gradlew check -Pjruby.execVersion=9.0.0.0.pre2

From what I've read this has to be manually accounted for in the plugin and doesn't come automatically

@rtyler rtyler added the enhancement label Jun 8, 2015
@mkristian
Copy link
Contributor

@mkristian mkristian commented Jun 8, 2015

@ysb33r
Copy link
Contributor

@ysb33r ysb33r commented Jun 8, 2015

I don't think the plugin should provide that functionality. It is better that is provided in a bespoke manner in the build script, should the author prefer it as such.

@ysb33r
Copy link
Contributor

@ysb33r ysb33r commented Jun 8, 2015

Having said that, it would be better to do it via a system property, rather than the project property. There is some semantic invovled here. In this way if is effectivley a property of the plugin rather than the specific project.

@mkristian
Copy link
Contributor

@mkristian mkristian commented Jun 8, 2015

actually I was reading it as
./gradlew check -Djruby.execVersion=9.0.0.0.pre2

probably since I not aware what -P is meant for

@rtyler
Copy link
Member Author

@rtyler rtyler commented Jun 8, 2015

@ysb33r I'm fine with a system property, I can kind of understand why you don't think the functionality that the code should go into the plugin.

I think there is immense benefit to JRuby users and the JRuby core team by enabling this functionality across the board by default for jruby-gradle users. That would make it absolutely trivial for jruby-gradle projects to contribute feedback to the project on the success of jruby 9k which is pretty important IMO

@ysb33r
Copy link
Contributor

@ysb33r ysb33r commented Jun 8, 2015

I think there is immense benefit to JRuby users and the JRuby core team by enabling this functionality across the board by default for jruby-gradle users. That would make it absolutely trivial for jruby-gradle projects to contribute feedback to the project on the success of jruby 9k which is pretty important IMO

I am with you on that. It will also allow to set up an additional travis axis to compile with the normal & 9K
versions.

I think you just need to do something like

String defaultVersion = System.getProperty('jruby.defaultVersion') ?: '1.7.20'
String execVersion = System.getProperty('jruby.execVersion') ?: defaultVersion
@rtyler
Copy link
Member Author

@rtyler rtyler commented Jun 8, 2015

👍

I'll submit a PR later today

@ysb33r ysb33r added this to the 0.3.1 milestone Jul 6, 2015
@rtyler rtyler modified the milestones: 0.3.1, 0.4 Jul 7, 2015
@rtyler rtyler modified the milestone: 0.4 Jul 14, 2015
@rtyler rtyler added the base label Jul 20, 2015
@rtyler rtyler modified the milestone: 1.1.0 - Dresden Aug 2, 2015
rtyler added a commit that referenced this issue Aug 14, 2015
References  #131
@rtyler
Copy link
Member Author

@rtyler rtyler commented Sep 15, 2015

I'm back to thinking this should be a project property which affords the user the greatest amount of flexibility (IMHO) since they can take advantage of the -P CLI, gradle.properties and ~/.gradle/gradle.properties delegation for setting it.

For projects at Lookout we're using -PjrubyVersion=9.0.0.0 which allows the releng/build team to test projects with different JRuby versions easily, while allowing multi-project build authors to centralize their JRuby runtime version in the root project's gradle.properties file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.