Link to the full source on the homepage to make the documentation more clear
This also adds links to where somebody can edit the page and easily submit a pull request
This commit is contained in:
parent
2c3c5004ca
commit
38f50d440f
|
@ -37,5 +37,8 @@
|
|||
= page.title
|
||||
= content
|
||||
|
||||
|
||||
%hr/
|
||||
|
||||
%div#improve
|
||||
%a{:href => "https://github.com/jruby-gradle/jruby-gradle-plugin/edit/master/docs/#{page.relative_source_path}"}
|
||||
improve this page
|
||||
|
|
|
@ -24,13 +24,13 @@ Ruby and Java developers alike.
|
|||
The simplest example is a hello-world from Gradle, using JRuby/Gradle we can
|
||||
execute a Ruby script, which has Ruby-based dependencies:
|
||||
|
||||
.build.gradle
|
||||
.build.gradle (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/run-simple-ruby-script/build.gradle[full source])
|
||||
[source, gradle]
|
||||
----
|
||||
include::../examples/run-simple-ruby-script/build.gradle[lines=16..30]
|
||||
----
|
||||
|
||||
.print-script.rb
|
||||
.print-script.rb (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/run-simple-ruby-script/print-script[full source])
|
||||
[source, ruby]
|
||||
----
|
||||
include::../examples/run-simple-ruby-script/print-script.rb[]
|
||||
|
@ -44,25 +44,23 @@ image::images/print-script-output.png[]
|
|||
|
||||
=== Packaging some Ruby
|
||||
|
||||
.build.gradle
|
||||
.build.gradle (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/self-executing-jar/build.gradle[full source])
|
||||
[source, gradle]
|
||||
----
|
||||
include::../examples/self-executing-jar/build.gradle[lines=17..33]
|
||||
----
|
||||
|
||||
.entrypoint.rb
|
||||
.entrypoint.rb (link:https://github.com/jruby-gradle/jruby-gradle-plugin/blob/master/examples/self-executing-jar/entrypoint.rb[full source])
|
||||
[source, ruby]
|
||||
----
|
||||
include::../examples/self-executing-jar/entrypoint.rb[]
|
||||
----
|
||||
.
|
||||
|
||||
|
||||
Executing `./gradlew jrubyJar` will build a `.jar` file inside of the
|
||||
`build/libs` directory which can then be invoked:
|
||||
|
||||
`% java -jar build/libs/self-executing-jar-jruby.jar`
|
||||
|
||||
|
||||
image::images/self-executing-jar-output.png[]
|
||||
|
||||
|
||||
|
|
|
@ -26,3 +26,11 @@
|
|||
#main_nav .on a {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#improve {
|
||||
margin-right: 5px;
|
||||
margin-bottom: 15px;
|
||||
font-weight: bold;
|
||||
font-size: 0.8em;
|
||||
float: right;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue