Skip to content

jamiees2/jarjar-abrams-cli

Repository files navigation

Jar Jar Abrams CLI

A CLI wrapper around Jar Jar Abrams. Builds a command line utility which can process and shade JAR files.

See Releases for downloads

Usage

$ jarjar-abrams-cli -h
  -j, --jar  <arg>     The JAR to process
  -o, --out  <arg>     The output JAR path
  -r, --rules  <arg>   The JSON rules file containing jarjar rules
  -v, --verbose        Run in verbose mode
  -h, --help           Show help message

Jar Jar Abrams CLI takes in a rules.json file in the following format:

{
  "rename": [{"from": "<pattern>", "to": "<result>"}, ...],
  "zap": ["<pattern>", ...],
  "keep": ["<pattern>", ...]
}

These patterns are in the same format as described by jarjar-links

Example Usage

$ cat rules.json
{
  "rename": [{"from": "com.google.protobuf.**", "to": "shaded.com.google.protobuf.@1"}]
}
$ jarjar-abrams-cli -r rules.json -j protobuf-java-3.5.1.jar -o test.jar

Building

In order to build Jar Jar Abrams yourself, assuming you have sbt installed, you can run:

$ sbt assembly

This will output an executable to target/scala-2.12/jarjar-abrams-cli-<version>. Note that this executable requires Java 8 to run.

License

Licensed under the Apache License, Version 2.0.

Credits

Credits as listed in jarjar-abrams' README:

About

A CLI wrapper around jarjar-abrams

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages