jruby-gradle-plugin/jruby-gradle-jar-plugin
Schalk W. Cronjé 27424d647c Base plugin should be called jruby-gradle-plugin for now 2018-08-29 16:53:07 +01:00
..
gradle Base plugin should be called jruby-gradle-plugin for now 2018-08-29 16:53:07 +01:00
src Fix nagging issues preventing a release 2018-08-04 13:52:29 +02:00
.gitignore Add 'jruby-gradle-jar-plugin/' from commit 'dfd68a16f189c48fe056d6add4c7fed2b9381611' 2015-06-06 11:48:35 -07:00
.travis.yml Add 'jruby-gradle-jar-plugin/' from commit 'dfd68a16f189c48fe056d6add4c7fed2b9381611' 2015-06-06 11:48:35 -07:00
CHANGELOG.md Add 'jruby-gradle-jar-plugin/' from commit 'dfd68a16f189c48fe056d6add4c7fed2b9381611' 2015-06-06 11:48:35 -07:00
LICENSE Add 'jruby-gradle-jar-plugin/' from commit 'dfd68a16f189c48fe056d6add4c7fed2b9381611' 2015-06-06 11:48:35 -07:00
README.adoc Log an error, but don't halt execution, when `defaults 'gems'` is used 2015-10-03 16:38:36 -07:00
appveyor.yml Add 'jruby-gradle-jar-plugin/' from commit 'dfd68a16f189c48fe056d6add4c7fed2b9381611' 2015-06-06 11:48:35 -07:00
build.gradle Base plugin should be called jruby-gradle-plugin for now 2018-08-29 16:53:07 +01:00

README.adoc

<html lang="en"> <head> </head>
Build Status
download

Getting Started

Compatibility

This plugin requires link::http://gradle.org[Gradle] 2.0 or better

Installing

build.gradle
buildscript {
    repositories { jcenter() }

    dependencies {
        /* check jruby-gradle.org for the latest release */
        classpath "com.github.jruby-gradle:jruby-gradle-jar-plugin:[1.1.4,2.0)"
    }
}

apply plugin: 'com.github.jruby-gradle.jar'

Implicitly loaded plugins

Currently, the jar plugin only depends on the base plugin of the same version as the jar plugin and the java-base plugin included with your version of Gradle.

Tasks

JRubyJar

build.gradle
jrubyJar {
    /* All methods and properties from `Jar` */
    from 'app'
}

Types of jars

Runnable Jars

build.gradle
jrubyJar {
    // tell the plugin to pack a runnable jar
    initScript runnable()

    // Use the default bootstrap class (can be omitted)
    defaultMainClass()

    // Make the JAR executable by supplying your own main class
    mainClass 'my.own.main'
}

Library Jars

A library jar isnt really much more than a container which includes the configured gems and jar dependencies inside of the packaged .jar file.

build.gradle
jrubyJar {
    // tell the plugin to pack a runnable jar (no bootstrap script)
    initScript library()
}
</html>