Skip to content
Snippets Groups Projects
Commit ea45de39 authored by René Schöne's avatar René Schöne
Browse files

WIP: Working on bugfixes for attributes

- fix runParameters if parameters.txt does not exist
parent 221fa66e
No related branches found
No related tags found
1 merge request!32Resolve "Allow collection and circular attributes as endpoint targets"
Pipeline #13817 passed
......@@ -187,12 +187,20 @@ ext {
}
application.mainClassName = "${mainClassName}"
def parametersTxtFileName = 'ragconnect.base/parameters.txt'
task runParameters(type: JavaExec) {
doFirst {
if (!new File(parametersTxtFileName).exists()) {
throw new GradleException("Please create '${parametersTxtFileName}' to use this task.")
}
}
group 'application'
description 'Run using parameters.txt (line-separated with comments)'
classpath sourceSets.main.runtimeClasspath
main = "org.jastadd.ragconnect.compiler.Compiler"
args new File('ragconnect.base/parameters.txt').text.strip().split("\n").dropWhile { it.startsWith("#") }
try {
args new File(parametersTxtFileName).text.strip().split("\n").dropWhile { it.startsWith("#") }
} catch (FileNotFoundException ignored) { /* empty */ }
standardInput = System.in
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment