Skip to content
Permalink
Browse files

written build script for slf4j integration

  • Loading branch information...
maciejmikosik committed May 1, 2017
1 parent f723d80 commit 7007c6a3ee17f9031f2141df142d966e7f3b76db
Showing with 67 additions and 0 deletions.
  1. +67 −0 run/build
@@ -11,6 +11,10 @@ PROJECT=`pwd`
JAVA="${MAIN}/java"
JAR="${MAIN}/jar"

SLF4J="${PROJECT}/slf4j"
SLF4J_JAVA="${SLF4J}/java"
SLF4J_JAR="${SLF4J}/jar"

########## CLEANUP ##########
rm \
--recursive \
@@ -128,11 +132,74 @@ rm \
--force \
"${UNPACKED}"

###########################
########## SLF4J ##########
###########################

########## PREPARE ##########
mkdir \
--parents \
"${UNPACKED}"

########## COMPILE SOURCES ##########
javac \
-classpath "${SLF4J_JAR}/*:${BUILDING}/logbuddy.jar" \
-sourcepath "${SLF4J_JAVA}" \
-source 1.8 \
-target 1.8 \
-d "${UNPACKED}" \
"${SLF4J_JAVA}/org/logbuddy/bind/Slf4jBinder.java"

########## COPY SOURCES ##########
cp \
--recursive \
"${SLF4J_JAVA}/." \
"${UNPACKED}"

########## COPY LICENSE ##########
cp \
"${RUN}"/*license* \
"${UNPACKED}"
cp \
"${PROJECT}"/LICENSE.txt \
"${UNPACKED}"

########## RESET TIMESTAMPS IN UNPACKED ##########
find "${UNPACKED}" | xargs touch --date=@0
cd "${UNPACKED}"
zip \
--quiet \
-X \
--recurse-paths \
"${BUILDING}/logbuddy-slf4j.jar" \
./*
cd "${PROJECT}"

########## ZIP JAR ##########
cd "${UNPACKED}"
zip \
--quiet \
-X \
--recurse-paths \
"${BUILDING}/logbuddy-slf4j.jar" \
./*
cd "${PROJECT}"

########## CLEAN UNPACKED ##########
rm \
--recursive \
--force \
"${UNPACKED}"

######################################
########## BUILD SUCCESSFUL ##########
######################################

echo ""
echo "BUILD SUCCESSFUL"
echo "created ${BUILDING}/logbuddy.jar"
echo "sha1sum=`sha1sum ${BUILDING}/logbuddy.jar | cut -f1 -d' '`"
echo "created ${BUILDING}/logbuddy-slf4j.jar"
echo "sha1sum=`sha1sum ${BUILDING}/logbuddy-slf4j.jar | cut -f1 -d' '`"


0 comments on commit 7007c6a

Please sign in to comment.
You can’t perform that action at this time.