- Set some optimization settings for gradle.
- Fix error-handling in "installAndRun.sh". - Update dependencies.
This commit is contained in:
parent
01f12e2fe2
commit
182d6153d4
|
@ -1,6 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.springframework.boot' version '2.7.5'
|
id 'org.springframework.boot' version '2.7.6'
|
||||||
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
|
id 'io.spring.dependency-management' version '1.1.0'
|
||||||
id 'java'
|
id 'java'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
org.gradle.caching=true
|
||||||
|
org.gradle.parallel=true
|
||||||
|
org.gradle.caching.debug=false
|
||||||
|
org.gradle.warning.mode=all
|
|
@ -1,5 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -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
|
justInstall=0
|
||||||
|
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
justInstall=$1
|
justInstall=$1
|
||||||
elif [[ $# -gt 1 ]]; then
|
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
|
fi
|
||||||
|
|
||||||
# Check of the "inputData.txt" file exist, if not, ask to fill it.
|
# 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"
|
echo -e "\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gradleVersion="7.5.1"
|
gradleVersion="7.6"
|
||||||
|
|
||||||
if [[ justInstall -eq 0 ]]; then
|
if [[ justInstall -eq 0 ]]; then
|
||||||
|
|
||||||
if [ ! -d libs ]; 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
|
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.
|
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.
|
# Keep a backup of the existing JAR file.
|
||||||
|
|
Loading…
Reference in New Issue