gradle-shadow-jar

Palantir open source project

Лицензия

Лицензия

Категории

Категории

Gradle Компиляция и сборка Ant
Группа

Группа

com.palantir.gradle.shadow-jar
Идентификатор

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

gradle-shadow-jar
Последняя версия

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

88eab43
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

gradle-shadow-jar
Palantir open source project
Ссылка на сайт

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

https://github.com/palantir/gradle-shadow-jar
Организация-разработчик

Организация-разработчик

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

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

https://github.com/palantir/gradle-shadow-jar

Скачать gradle-shadow-jar

Зависимости

runtime (2)

Идентификатор библиотеки Тип Версия
com.github.jengelman.gradle.plugins » shadow jar 5.2.0
com.google.guava : guava jar 28.2-jre

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

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

Autorelease

Gradle shadow jar Bintray License

This is a Gradle plugin that wraps the existing shadow Gradle plugin to make producing partially shaded jars much easier. This means you can shade just one of your dependencies in a library or Gradle plugin to avoid dependency clashes. It is possible to produce fully shaded jars with this plugin, but it is not the aim of this plugin, and perf may be bad for shading a large dependency tree.

Applying the plugin

To apply this plugin, build.gradle should look something like:

 buildscript {
     repositories {
         maven { url 'https://dl.bintray.com/palantir/releases' }
     }
 
     dependencies {
         classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:<version>'
+        classpath 'com.palantir.gradle.shadow-jar:gradle-shadow-jar:<version>'
     }
     
     apply plugin: 'com.palantir.consistent-versions'
+    apply plugin: 'com.palantir.shadow-jar'
 }

Requires gradle-consistent-versions and Gradle 6 to work.

Producing shaded JARs

Shading is where you copy the class files of another jar into your jar, and then change the package names of the classes from the original jar. This removes dependencies from your project's publication and can reduce dependency conflicts at the expense of increased jar size and build time.

To use, identify which of your dependencies you want shaded and put them in the shadeTransitively configuration like so:

dependencies {
    implementation 'some-unshaded:dependency'

    shadeTransitively 'com.google.guava:guava'
}

The dependency you list and all its dependencies will be shaded unless one of these dependencies exists in other standard java configurations. For example, com.google.guava:guava:28.2-jre depends on 'com.google.code.findbugs:jsr305:3.0.2'. If you use the following:

dependencies {
    implementation 'com.google.code.findbugs:jsr305'

    shadeTransitively 'com.google.guava:guava'
}

will shade guava and all its dependencies except for jsr305 (and its dependencies), which will not be shaded and appear in the maven POM.

We explicitly ban logging libraries from shading, as they can cause problems when shaded, and will show up as real dependencies in your POM, even if they were brought in as transitives through shadeTransitively.

com.palantir.gradle.shadow-jar

Palantir Technologies

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

Версия
88eab43
2.5.0
2.4.0
2.3.0
2.2.0
2.1.0
2.0.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.3