Skip to content

Commit a0bf41d

Browse files
committed
jvmArgs now uses Tags class
1 parent 74d0a67 commit a0bf41d

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

build.gradle

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Tags {
1111
String mainClass
1212
String javaCmd = null
1313
List<String> args = []
14-
String jVMArgs = null
14+
List<String> jVMArgs = []
1515
String exec = null
1616
String runFirst = null
1717
private List<String> lines
@@ -33,7 +33,9 @@ class Tags {
3333
def argString = extract('Args:')
3434
if(argString)
3535
args = argString.split(' ')
36-
jVMArgs = extract('JVMArgs:')
36+
def jvmArgString = extract('JVMArgs:')
37+
if(jvmArgString)
38+
jVMArgs = jvmArgString.split(' ')
3739
exec = extract('Exec:')
3840
runFirst = extract('RunFirst:')
3941
}
@@ -138,13 +140,6 @@ subprojects {
138140
tasks.add(tags.fileRoot)
139141
}
140142

141-
// some java sources with JVM args
142-
List maybeJvmArgs = []
143-
String maybeJvmArgsLine = lines.find { it.startsWith('// {JVMArgs: ')}
144-
if (maybeJvmArgsLine != null) {
145-
maybeJvmArgs = maybeJvmArgsLine.trim().replaceAll('\\/\\/ \\{JVMArgs: ', '').replaceAll('}', '').split(' ')
146-
}
147-
148143
// some java sources depend on others to be run first
149144
String maybeRunFirst = null
150145
String maybeRunFirstLine = lines.find { it.startsWith('// {RunFirst: ')}
@@ -168,7 +163,7 @@ subprojects {
168163
main = tags.mainClass
169164
classpath = sourceSets.main.runtimeClasspath
170165
args = tags.args
171-
jvmArgs = maybeJvmArgs
166+
jvmArgs = tags.jVMArgs
172167
ignoreExitValue = maybeIgnoreExitValue
173168
standardOutput = runStandardOutput
174169
errorOutput = runErrorOutput

0 commit comments

Comments
 (0)