Skip to content

Commit

Permalink
Install default JDK and update Gradle version
Browse files Browse the repository at this point in the history
  • Loading branch information
amrabed committed May 18, 2020
1 parent b2788d8 commit f47096d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: java
jdk: oraclejdk8

addons:
sonarcloud:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task createJar(type: Jar) {
attributes 'Implementation-Title': 'rhids',
'Main-Class': mainClassName
}
baseName = project.name
archivesBaseName = project.name
from { configurations.extralibs.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
Expand All @@ -26,4 +26,4 @@ repositories {
dependencies {
implementation 'info.picocli:picocli:3.8.0'
extralibs 'info.picocli:picocli:3.8.0'
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
10 changes: 2 additions & 8 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ APP_NAME="rhids"

# Install Java 8 (if not installed)
if ! type java > /dev/null; then
apt-get install -y software-properties-common
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
apt-get install -y oracle-java8-installer
apt install -y default-jre
fi

# Build and install project
./gradlew createJar && cp build/libs/*.jar $APP_NAME/$APP_NAME.jar
cp -r $APP_NAME /usr/bin
sed -i "/^PATH/s/\"$/:\/usr\/bin\/$APP_NAME\"/g" /etc/environment
cp -r $APP_NAME/* /usr/bin
mkdir /var/log/$APP_NAME

0 comments on commit f47096d

Please sign in to comment.