jruby-gradle-plugin/jar-plugin
Uwe Kubosch f36eb27c1d Correct plugin id for com.github.jruby-gradle.war
Rename gradle project for the base plugin to jruby-gradle-base-plugin
2023-05-16 10:13:03 +02:00
..
gradle
src Adjust license to include 2021 2021-05-02 19:15:20 +02:00
CHANGELOG.md
LICENSE
README.adoc Remove all dependency on Torquebox (#388) 2019-12-19 23:28:05 +01:00
build.gradle Correct plugin id for com.github.jruby-gradle.war 2023-05-16 10:13:03 +02: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>