- Set some optimization settings for gradle.

- Fix error-handling in "installAndRun.sh".
- Update dependencies.
This commit is contained in:
Lampros Smyrnaios 2022-11-30 16:25:57 +02:00
parent 01f12e2fe2
commit 182d6153d4
4 changed files with 22 additions and 8 deletions

View File

@ -1,6 +1,6 @@
plugins {
id 'org.springframework.boot' version '2.7.5'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'org.springframework.boot' version '2.7.6'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}

4
gradle.properties Normal file
View File

@ -0,0 +1,4 @@
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.caching.debug=false
org.gradle.warning.mode=all

View File

@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,11 +1,20 @@
cd "${0%/*}" || (echo "Could not chdir to this script's dir!" && exit) # Change the working directory to the script's directory, when running from other location.
# This script installs and runs the project.
# For error-handling, we cannot use the "set -e" since: it has problems https://mywiki.wooledge.org/BashFAQ/105
# So we have our own function, for use when a single command fails.
handle_error () {
echo -e "$1"; exit $2
}
# Change the working directory to the script's directory, when running from another location.
cd "${0%/*}" || handle_error "Could not change-dir to this script's dir!" 1
justInstall=0
if [[ $# -eq 1 ]]; then
justInstall=$1
elif [[ $# -gt 1 ]]; then
echo -e "Wrong number of arguments given: ${#}\nPlease execute it like: script.sh <justInstall: 0 | 1>"; exit 1
echo -e "Wrong number of arguments given: ${#}\nPlease execute it like: script.sh <justInstall: 0 | 1>"; exit 2
fi
# Check of the "inputData.txt" file exist, if not, ask to fill it.
@ -34,15 +43,15 @@ if [[ ! -f $inputDataFile ]]; then
echo -e "\n\n"
fi
gradleVersion="7.5.1"
gradleVersion="7.6"
if [[ justInstall -eq 0 ]]; then
if [ ! -d libs ]; then
mkdir libs || (echo -e "The directory \"libs\" could not be created! Exiting.." && exit 2)
mkdir libs || handle_error "The directory \"libs\" could not be created! Exiting.." 3
fi
cd libs || exit 3
cd libs || exit 4
git clone https://github.com/LSmyrnaios/PublicationsRetriever.git # We assume there is no previously source-code here, if so, it will be overwritten.
# Keep a backup of the existing JAR file.