Gradle JarInJar Plugin

A Gradle plugin for generating self-contained executable jars.

Лицензия

Лицензия

Категории

Категории

Gradle Компиляция и сборка Сеть
Группа

Группа

net.robyf
Идентификатор

Идентификатор

gradle-jarinjar-plugin
Последняя версия

Последняя версия

1.0.9
Дата

Дата

Тип

Тип

jar
Описание

Описание

Gradle JarInJar Plugin
A Gradle plugin for generating self-contained executable jars.
Ссылка на сайт

Ссылка на сайт

https://github.com/robyf/gradle-jarinjar-plugin
Система контроля версий

Система контроля версий

https://github.com/robyf/gradle-jarinjar-plugin

Скачать gradle-jarinjar-plugin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.robyf/gradle-jarinjar-plugin/ -->
<dependency>
    <groupId>net.robyf</groupId>
    <artifactId>gradle-jarinjar-plugin</artifactId>
    <version>1.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/net.robyf/gradle-jarinjar-plugin/
implementation 'net.robyf:gradle-jarinjar-plugin:1.0.9'
// https://jarcasting.com/artifacts/net.robyf/gradle-jarinjar-plugin/
implementation ("net.robyf:gradle-jarinjar-plugin:1.0.9")
'net.robyf:gradle-jarinjar-plugin:jar:1.0.9'
<dependency org="net.robyf" name="gradle-jarinjar-plugin" rev="1.0.9">
  <artifact name="gradle-jarinjar-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.robyf', module='gradle-jarinjar-plugin', version='1.0.9')
)
libraryDependencies += "net.robyf" % "gradle-jarinjar-plugin" % "1.0.9"
[net.robyf/gradle-jarinjar-plugin "1.0.9"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

gradle-jarinjar-plugin

A repackaging of Eclipse's jar in jar loader easily usable as gradle plugin. It configures the default jar task so that the generated file contains all the needed dependencies without any need to distribute them separately.

It uses eclipse's jar in jar implementation for running the jar.

Usage

Apply the plugin

To use the plugin with Gradle 2.1 or later, add the following to your build.gradle file:

plugins {
  id 'net.robyf.jarinjar' version '1.0.9'
}

To use the plugin with Gradle 2.0 or older, or to use a snapshot release of the plugin, add the following to build.gradle:

buildscript {
    repositories {
        mavenCentral()
        // The next repo is only needed while using SNAPSHOT versions
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    }
    dependencies {
        classpath "net.robyf:gradle-jarinjar-plugin:1.0.9"
    }
}
apply plugin: 'net.robyf.jarinjar'

Configuration

The behavior of this plugin is controlled by setting various options in the executableJar block of your build.gradle file.

  • mainClass = <class name>: The name of the class to be executed when running the jar.
  • configuration = <configuration>: Class path used when running the jar. The default is runtime.

Example

plugins {
    id "net.robyf.jarinjar" version "1.0.9"
}

apply plugin: 'java'

wrapper {
    gradleVersion = '3.0'
}

repositories {
    jcenter()
}

dependencies {
    compile group: 'org.json', name: 'json', version: '20160810'
}

executableJar {
    mainClass 'com.example.MainClass'
}

and just run ./gradlew jar.

Версии библиотеки

Версия
1.0.9
1.0.8
1.0.6
1.0.0.5
1.0.0.1