Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer

plugins {
id "com.jfrog.artifactory" version "4.28.3" //artifactory support
id 'groovy' // groovy support
Expand All @@ -11,6 +14,7 @@ plugins {
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id 'jacoco' // java code coverage plugin
id "org.sonarqube" version "3.3" // sonarqube
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
}

ext {
Expand All @@ -31,13 +35,11 @@ defaultTasks 'build'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion


apply from: scriptsLocation + 'pmd.gradle'
apply from: scriptsLocation + 'spotbugs.gradle'
apply from: scriptsLocation + 'spotless.gradle'
apply from: scriptsLocation + 'modernizer.gradle'
apply from: scriptsLocation + 'checkJavaVersion.gradle'
apply from: scriptsLocation + 'fatJar.gradle'
apply from: scriptsLocation + 'tests.gradle'
apply from: scriptsLocation + 'jacoco.gradle' // jacoco java code coverage
apply from: scriptsLocation + 'sonarqube.gradle' // sonarqube config
Expand Down Expand Up @@ -125,7 +127,7 @@ publishing {
from components.java
artifact sourcesJar
artifact javadocJar
artifact fatJar
artifact shadowJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
Expand All @@ -151,7 +153,7 @@ tasks.withType(JavaCompile) {
}

application {
mainClassName = mainClass
mainClassName = "edu.ie3.tools.Main"
}

jar {
Expand All @@ -166,3 +168,11 @@ run {
// Gradle uses an empty Input as default, leading to a non-blocking behaviour and thus an immediate shutdown
standardInput = System.in
}

shadowJar {
transform(AppendingTransformer) {
resource = 'reference.conf'
}
transform(Log4j2PluginsCacheFileTransformer)
zip64 = true
}
13 changes: 0 additions & 13 deletions gradle/scripts/fatJar.gradle

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/java/edu/ie3/tools/Converter.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public void run() {
printInit();
validateConnectionProperties();
convert();
} else logger.info("Converter is already running.");
} else
logger.info(
"Converter is already running or you can't acquire a lock (in which case you might try sudo).");
}

/** Validates Connection Properties from user input */
Expand Down