Updated build.gradle to automatically build fat jars with the dependencies in the /libs folder. This utilizes the shade.sh shell script. Use ./gradlew without explicitely invoking the build task, as this will automatically build a fat jar.
Sorry for this painful commit, but git somehow f'd up and sees changes in files where there aren't any.
This commit is contained in:
17
shade.sh
Normal file
17
shade.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
JARPATH="$1"
|
||||
LIBSPATH="$2"
|
||||
FILENAME="$3"
|
||||
|
||||
TEMPDIR="./tempdir"
|
||||
mkdir $TEMPDIR
|
||||
|
||||
unzip -o $LIBSPATH"/*.jar" -d $TEMPDIR
|
||||
unzip -o $JARPATH -d $TEMPDIR
|
||||
|
||||
JARDIR=$(dirname "$JARPATH")
|
||||
|
||||
#Thanks to johni0702 for the following line of code <3
|
||||
cd $TEMPDIR && ls | zip -r -@ "../$JARDIR/$FILENAME" && cd ..
|
||||
|
||||
rm -r $TEMPDIR
|
||||
Reference in New Issue
Block a user