jruby-gradle-plugin/jar-plugin
Schalk Cronje a8ffdf8954 Remove all dependency on Torquebox (#388) 2019-12-19 23:28:05 +01:00
..
gradle Restructured directories for simpler and shorter names 2019-05-05 15:35:34 +02:00
src Remove all dependency on Torquebox (#388) 2019-12-19 23:28:05 +01:00
CHANGELOG.md Restructured directories for simpler and shorter names 2019-05-05 15:35:34 +02:00
LICENSE Restructured directories for simpler and shorter names 2019-05-05 15:35:34 +02:00
README.adoc Remove all dependency on Torquebox (#388) 2019-12-19 23:28:05 +01:00
build.gradle Pin to the shadow plugin 4.0.4 and pull in enough internal classes to compile and run 2019-05-18 14:08:43 -07:00

README.adoc

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

Getting Started

Compatibility

This plugin requires link::http://gradle.org[Gradle] 4.9 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>