Update Java build setups for external dependencies

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 3 years ago
parent 86ed481413
commit 4a41f7a89b
  1. 5
      Java/scripts/build.sh
  2. 4
      Java/scripts/clean.sh
  3. 7
      Java/scripts/jar.sh
  4. 6
      Java/scripts/md5
  5. 4
      Java/scripts/version_info
  6. 3
      sig

@ -1,10 +1,9 @@
#Builds and runs the project.
#Java
source ${LANGUAGE}/scripts/version_info
rm -Rf out/*
javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java
javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${CLASS_PATH} -d ${OUT_DIR} ${PROJECT_DIR}/*.java
printf "\n\n\nRunning Program...\n\n"
ORIGINAL_LOC=$(pwd)
cd $OUT_DIR
java -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@"
java -cp .:../lib/bin -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@"
${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh

@ -1,4 +1,4 @@
#Cleans up and removes unused files.
#Java
find . -type f -name *.class -delete
find . -type f -name manifest -delete
find -type f -name *.class -delete
find -type f -name manifest -delete

@ -2,7 +2,7 @@
#Java
source ${LANGUAGE}/scripts/version_info
rm -Rf bin/*
javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java
javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${CLASS_PATH} -d ${OUT_DIR} ${PROJECT_DIR}/${PROJECT_NAME}.java
printf "\n\n\nGenerating Manifest...\n\n"
touch manifest
echo "Main-Class: ${MAIN_CLASS}" >> manifest
@ -10,7 +10,8 @@ printf "\n\n\nCreating Jar...\n\n"
ORIGINAL_LOC=$(pwd)
cd ${OUT_DIR}
jar cfm ${PROJECT_NAME}.jar ${ORIGINAL_LOC}/manifest sig
jar uf ${PROJECT_NAME}.jar -C ../lib/bin/ .
printf "\n\n\nRunning Program...\n\n"
java -jar ${PROJECT_NAME}.jar "$@"
cd ..
java -cp .:../lib/bin -Djava.library.path="${LIBRARY_PATH}" -jar ${PROJECT_NAME}.jar "$@"
./${LANGUAGE}/scripts/clean.sh
cd ..

@ -1,5 +1,5 @@
build.sh:947a32eaed85aa23e589b1c70523a00b -
clean.sh:96ce35f2d2dcb555421e00a6afda23ca -
build.sh:22308eae5fd9c88aa16fef54cf03ae21 -
clean.sh:668a2f9b568c55f6a044a509315032f6 -
commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 -
jar.sh:56f9b7c6dc8e85f28ffefe9ce82b1f07 -
jar.sh:99c7520b5eb08be888ce3c91784e5462 -
update.sh:3be721658983183efa395984acd96b03 -

@ -1,2 +1,2 @@
export SOURCE_VERSION="1.11"
export TARGET_VERSION="1.8"
export SOURCE_VERSION="8"
export TARGET_VERSION="8"

3
sig

@ -4,8 +4,9 @@ define PROJECT_NAME "JavaProjectTemplate"
define PROJECT_DIR "src/sig"
define MAIN_CLASS "sig.${PROJECT_NAME}"
define OUT_DIR "bin"
define LIBRARY_PATH "../lib"
define CLASS_PATH "${PROJECT_DIR}/..:lib/bin"
define LANGUAGE ""
define LIBRARY_PATH "lib"
define AUTO_UPDATE true

Loading…
Cancel
Save