• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3set -eux
4
5readonly INPUT_JAR=$1
6readonly SHADE_RULES=$2
7
8_shade_libary() {
9  local shader=$(dirname $0)/../tools/shader
10  local output="${INPUT_JAR%.*}-shaded.${INPUT_JAR##*.}"
11
12  ./$shader/gradlew -p $shader shadowJar \
13      -PinputJar="../../$INPUT_JAR" \
14      -PshadedRules=$SHADE_RULES
15
16  # Copy the shaded jar to the specified output
17  cp $shader/build/libs/shader.jar $output
18}
19
20_shade_libary
21