Home

Awesome

Build Status Plugin version

Gradle-lean

A gradle plugin that minimizes dependency jars.

Motivation

We have maven-shade to help us minimize jars. But when it comes to gradle, the similar plugin gradle-shadow doesn't do the favor. This project is to provide a lightweight way to reduce the size of an java application distribution package on the fly.

This plugin depends on JavaPlugin and ApplicationPlugin.

will be minimized by respective lean tasks.

Todo list:

How to use:

Add gradle-lean plugin to build:

plugins {
    id "com.github.gradle-lean" version "0.1.2"
}

Execute gradle tasks:

Exclusions

Class or dependency jar exclusion can be set in build.gradle:

leanConfig {
    excludedClasses = [
            "com.google.common.cache.*",
            "com.google.common.io.ByteSink"
    ]
    excludedDependencies = [
            "com.google.jimfs:jimfs:1.1"
            //or "com.google.jimfs:jimfs:*"
    ]
}

About:

Author: Cause Chung(cuzfrog@139.com) License: Apache-2.0