jruby-gradle.github.io/news.atom

369 lines
17 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<feed xml:lang='en-US' xmlns='http://www.w3.org/2005/Atom'>
<id>http://jruby-gradle.org/</id>
<title>JRuby/Gradle News</title>
<updated>2015-09-10T15:24:41-07:00</updated>
<link href='http://jruby-gradle.org/news.atom' rel='self' type='application/atom+xml'>
<link href='http://jruby-gradle.org/' rel='alternate' type='text/html'>
<entry>
<id>http://jruby-gradle.org/news/2015/09/01/gradle-spotlight-continuous-build/</id>
<title>Gradle Feature Spotlight: Continuous Build</title>
<updated>2015-09-10T15:24:41-07:00</updated>
<published>2015-09-01T00:00:00+00:00</published>
<link href='http://jruby-gradle.org/news/2015/09/01/gradle-spotlight-continuous-build/' rel='alternate' type='text/html'>
<summary>
Earlier this year the Gradle project released version
2.5 with a heap of new features
and improvements. One of the most touted of those features is an incubating
feature (read: beta) named
Continuous
Build which automatically re-executes tasks after a file change. Rubyists may
recognize that this functionality is similar to what
the guard gem provides.
What makes "continuous build" special is that it makes use of the existing
build data present in your Gradle build. Using a
task&#8217;s
inputs the continuous build feature can automatically "watch" the appropriate
files to re-execute your task, or your tasks dependent tasks, automatically as
they change!
For users JRuby/Gradle this means that upgrading to Gradle 2.5 or...
</summary>
<content type='html'>
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Earlier this year the &lt;a href=&quot;http://gradle.org&quot;&gt;Gradle&lt;/a&gt; project released version
&lt;a href=&quot;https://docs.gradle.org/2.5/release-notes&quot;&gt;2.5&lt;/a&gt; with a heap of new features
and improvements. One of the most touted of those features is an incubating
feature (read: beta) named
&lt;a href=&quot;https://docs.gradle.org/current/userguide/continuous_build.html&quot;&gt;Continuous
Build&lt;/a&gt; which automatically re-executes tasks after a file change. Rubyists may
recognize that this functionality is similar to what
&lt;a href=&quot;http://guardgem.org/&quot;&gt;the guard gem&lt;/a&gt; provides.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What makes &quot;continuous build&quot; special is that it makes use of the &lt;em&gt;existing&lt;/em&gt;
build data present in your Gradle build. Using a
&lt;a href=&quot;https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:task_inputs_outputs&quot;&gt;tasks
inputs&lt;/a&gt; the continuous build feature can automatically &quot;watch&quot; the appropriate
files to re-execute your task, or your tasks dependent tasks, automatically as
they change!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;For users JRuby/Gradle this means that upgrading to Gradle 2.5 or later, and
ensuring your &lt;code&gt;build.gradle&lt;/code&gt; declares task inputs and continuous build will
&quot;just work!&quot; Consider the following example for running
&lt;a href=&quot;http://rspec.info&quot;&gt;RSpec&lt;/a&gt; tests:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;title&quot;&gt;build.gradle&lt;/div&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;CodeRay highlight nowrap&quot;&gt;&lt;code data-lang=&quot;gradle&quot;&gt;buildscript {
repositories { jcenter() }
dependencies {
classpath &quot;com.github.jruby-gradle:jruby-gradle-plugin:1.0.3&quot; &lt;i class=&quot;conum&quot; data-value=&quot;1&quot;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
}
}
apply plugin: 'com.github.jruby-gradle.base' &lt;i class=&quot;conum&quot; data-value=&quot;2&quot;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
dependencies {
jrubyExec 'rubygems:rspec:3.3.0' &lt;i class=&quot;conum&quot; data-value=&quot;3&quot;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
}
import com.github.jrubygradle.JRubyExec
task spec(type: JRubyExec) {
group 'JRuby'
description 'Execute the RSpecs in JRuby'
script 'rspec'
inputs.source fileTree('spec').include('**/*.rb'), fileTree('lib').include('**/*.rb') &lt;i class=&quot;conum&quot; data-value=&quot;4&quot;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;colist arabic&quot;&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&quot;conum&quot; data-value=&quot;1&quot;&gt;&lt;/i&gt;&lt;b&gt;1&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Specify our dependency on the JRuby/Gradle &lt;a href=&quot;http://jruby-gradle.org/base/&quot;&gt;base plugin&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&quot;conum&quot; data-value=&quot;2&quot;&gt;&lt;/i&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Apply the plugin to our current project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&quot;conum&quot; data-value=&quot;3&quot;&gt;&lt;/i&gt;&lt;b&gt;3&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Define our RSpec gem dependency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;i class=&quot;conum&quot; data-value=&quot;4&quot;&gt;&lt;/i&gt;&lt;b&gt;4&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;Set our task inputs to the &lt;code&gt;.rb&lt;/code&gt; files in &lt;code&gt;spec/&lt;/code&gt; and in &lt;code&gt;lib/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Using the &lt;code&gt;build.gradle&lt;/code&gt; above, I can auto-execute my tests whenever a Ruby file
inside of the &lt;code&gt;spec/&lt;/code&gt; (my tests) or &lt;code&gt;lib/&lt;/code&gt; (my code under test) with the
following command:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;literalblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;nowrap&quot;&gt;% ./gradlew -t spec&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Heres some example output from my example project:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;nowrap&quot;&gt;example-project git:(master) % ./gradlew -t spec
Continuous build is an incubating feature.
:spec
Randomized with seed 37453
..............................................
Finished in 0.52 seconds (files took 3.82 seconds to load)
46 examples, 0 failures
Randomized with seed 37453
BUILD SUCCESSFUL
Total time: 8.77 secs
Waiting for changes to input files of tasks... (ctrl-d to exit)&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At this point the Gradle process is patiently waiting until I write my most
recent changes, then it kicks off the same task:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;listingblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;pre class=&quot;nowrap&quot;&gt;Change detected, executing build...
:spec
Randomized with seed 64935
..............................................
Finished in 0.502 seconds (files took 3.5 seconds to load)
46 examples, 0 failures
Randomized with seed 64935
BUILD SUCCESSFUL
Total time: 7.341 secs
Waiting for changes to input files of tasks... (ctrl-d to exit)&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Pretty neat huh?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What makes this functionality exceptionally powerful for JRuby/Gradle users is
that it respects the task inputs but also the task dependency graph. If my &lt;code&gt;spec&lt;/code&gt;
task declares a dependency on the &lt;code&gt;compileJava&lt;/code&gt; task, whenever my Java source
code changes, that will trigger a re-execution of &lt;code&gt;compileJava&lt;/code&gt; and in turn
&lt;code&gt;spec&lt;/code&gt;!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;So when youre authoring tasks, even if youre not this feature right now, be
sure to declare task inputs. That build metadata can unlock lots of interesting
functionality as Gradle continues to improve!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Continuous build is one of many examples of powerful Gradle functionality which
can easily used in JRuby/Gradle, I hope you find it useful!&lt;/p&gt;
&lt;/div&gt;
</content>
</entry>
<entry>
<id>http://jruby-gradle.org/news/2015/08/16/introduction-at-jrubyconfeu/</id>
<title>JRuby/Gradle at JRubyConf EU 2015</title>
<updated>2015-09-10T15:24:41-07:00</updated>
<published>2015-08-16T00:00:00+00:00</published>
<link href='http://jruby-gradle.org/news/2015/08/16/introduction-at-jrubyconfeu/' rel='alternate' type='text/html'>
<summary>
A couple weeks ago, Schalk,
Christian and
I were fortunate enough to participate in the
wonderful JRubyConf EU 2015 in Potsdam Germany.
In the days that preceeded the conference we pulled together and finished up
what would become the 1.0
release of the core plugins. Just in time for my presentation to introduce the
JRuby/Gradle toolchain to the audience.
Below is a video recoded by Confreaks.tv of the talk
titled JRuby/Gradle: Bringing Java Powertools to Ruby:
The other sessions are also
worth checking out as there was a lot of great, in-depth, technical content
presented at the single-track one-day conference.
On behalf of the
JRuby/Gradle core
team, I&#8217;d like to thank the conference organizers (especially
Tobi)...
</summary>
<content type='html'>
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;A couple weeks ago, &lt;a href=&quot;https://github.com/ysb33r&quot;&gt;Schalk&lt;/a&gt;,
&lt;a href=&quot;https://github.com/mkristian&quot;&gt;Christian&lt;/a&gt; and
&lt;a href=&quot;https://github.com/rtyler&quot;&gt;I&lt;/a&gt; were fortunate enough to participate in the
wonderful &lt;a href=&quot;http://2015.jrubyconf.eu&quot;&gt;JRubyConf EU 2015&lt;/a&gt; in Potsdam Germany.
In the days that preceeded the conference we pulled together and finished up
what would become the &lt;a href=&quot;http://jruby-gradle.org/news/2015/08/04/jrubygradle-one-point-oh/&quot;&gt;1.0
release&lt;/a&gt; of the core plugins. Just in time for my presentation to introduce the
JRuby/Gradle toolchain to the audience.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Below is a video recoded by &lt;a href=&quot;http://confreaks.tv&quot;&gt;Confreaks.tv&lt;/a&gt; of the talk
titled &lt;strong&gt;JRuby/Gradle: Bringing Java Powertools to Ruby&lt;/strong&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;center&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/kZt6Ga20lD0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/center&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The &lt;a href=&quot;http://confreaks.tv/events/jrubyconf2015&quot;&gt;other sessions&lt;/a&gt; are also
worth checking out as there was a lot of great, in-depth, technical content
presented at the single-track one-day conference.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On behalf of the
&lt;a href=&quot;https://www.flickr.com/photos/agentdero/20372579815/&quot;&gt;JRuby/Gradle core
team&lt;/a&gt;, Id like to thank the conference organizers (especially
&lt;a href=&quot;https://github.com/pragtob&quot;&gt;Tobi&lt;/a&gt;) for hosting such a wonderful event and
allowing us the opportunity to participate. Hopefully well be back next year
with more to talk about!&lt;/p&gt;
&lt;/div&gt;
</content>
</entry>
<entry>
<id>http://jruby-gradle.org/news/2015/08/04/jrubygradle-one-point-oh/</id>
<title>JRuby/Gradle 1.0 Announced</title>
<updated>2015-09-10T15:24:41-07:00</updated>
<published>2015-08-04T00:00:00+00:00</published>
<link href='http://jruby-gradle.org/news/2015/08/04/jrubygradle-one-point-oh/' rel='alternate' type='text/html'>
<summary>
Less than one year after the JRuby/Gradle
project was founded, we are pleased to announce the release of 1.0 for the
core plugins, which includes the base plugin, the jar
plugin and an alpha version of the war plugin. This release marks
the stability of the core task and configuration APIs for the lifetime of the
1.x branch of development.
Notable Features
This release includes a number of notable features which can help developers
build high quality Ruby projects, based on JRuby.
Defaulted to the major milestone release: JRuby 9.0.0.0
Native Java dependency resolution via Gradle&#8217;s built-in support of Maven
repositories and with Gem dependency resolution via a
rubygems.org proxy.
Execution of local...
</summary>
<content type='html'>
&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Less than one year after the &lt;a href=&quot;http://github.com/jruby-gradle&quot;&gt;JRuby/Gradle&lt;/a&gt;
project was founded, we are pleased to announce the release of &lt;strong&gt;1.0&lt;/strong&gt; for the
core plugins, which includes &lt;a href=&quot;http://jruby-gradle.org/base/&quot;&gt;the base plugin&lt;/a&gt;, &lt;a href=&quot;http://jruby-gradle.org/jar/&quot;&gt;the jar
plugin&lt;/a&gt; and an alpha version of the &lt;a href=&quot;http://jruby-gradle.org/war/&quot;&gt;war plugin&lt;/a&gt;. This release marks
the stability of the core task and configuration APIs for the lifetime of the
&lt;code&gt;1.x&lt;/code&gt; branch of development.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;notable-features&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#notable-features&quot;&gt;&lt;/a&gt;Notable Features&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This release includes a number of notable features which can help developers
build high quality Ruby projects, based on &lt;a href=&quot;http://jruby.org&quot;&gt;JRuby&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;ulist&quot;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Defaulted to the major milestone release: &lt;a href=&quot;jruby.org/2015/07/22/jruby-9-0-0-0.html&quot;&gt;JRuby 9.0.0.0&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Native Java dependency resolution via Gradles built-in support of Maven
repositories and with Gem dependency resolution via a
&lt;a href=&quot;http://rubygems.org&quot;&gt;rubygems.org&lt;/a&gt; &lt;a href=&quot;http://rubygems.lasagna.io/proxy/maven/releases&quot;&gt;proxy&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execution of local Ruby script via the &lt;a href=&quot;http://jruby-gradle.org/base/#jrubyexec&quot;&gt;JRubyExec task&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execution of scripts provided by a gem dependency, e.g. &lt;code&gt;rspec&lt;/code&gt; via
&lt;a href=&quot;http://jruby-gradle.org/base/#jrubyexec&quot;&gt;JRubyExec task&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support for distinct
&lt;a href=&quot;https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html&quot;&gt;configurations&lt;/a&gt;
to isolate dependencies, even JRuby versions, between &lt;a href=&quot;http://jruby-gradle.org/base/#jrubyexec&quot;&gt;JRubyExec tasks&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Similar support for different configurations between &lt;a href=&quot;http://jruby-gradle.org/jar/#jrubyjar&quot;&gt;JRubyJar
tasks&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;project-history&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#project-history&quot;&gt;&lt;/a&gt;Project History&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The JRuby/Gradle project was originally started to address the challenges faced
when attempting to build complex Ruby applications based on
&lt;a href=&quot;http://jruby.org&quot;&gt;JRuby&lt;/a&gt;. With such applications it is desirable to leverage
the vast libraries available to JVM-based languages, as well as many of the
user-friendly gems built by Ruby developers&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After trying to make multiple tools, which werent designed to support non-Java
projects, work with Ruby &lt;a href=&quot;https://github.com/rtyler&quot;&gt;R. Tyler Croy&lt;/a&gt; started
building a prototype with Gradle to package up a JRuby application as a jar.
Shortly after publishing the prototype, &lt;a href=&quot;https://github.com/ysb33r&quot;&gt;Schalke
W. Cronje&lt;/a&gt; discovered the fledgling project and with his Gradle development
experience helped bring it from a weekend hack project to a well-tested,
well-structured set of Gradle plugins. Eventually
&lt;a href=&quot;https://github.com/mkristian&quot;&gt;Christian Meier&lt;/a&gt;, whose
link:https://github.com/torquebox/rubygems-servlets] code helped make the
project originally possible, joined the team to help improve support in JRuby
itself for the different embedded operating modes that the JRuby/Gradle
toolchain makes use of.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content>
</entry>
</feed>