Skip to content

Commit 72a3705

Browse files
committed
Towards the unified {java command
1 parent e849109 commit 72a3705

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class Tags {
2525
mainMethod = block.contains('main(String[] args)')
2626
fileRoot = lines[0].split("/")[-1] - ".java"
2727
mainClass = fileRoot
28-
javaCmd = extract('main:')
29-
if(javaCmd)
28+
javaCmd = extract('java')
29+
if(javaCmd) {
3030
mainClass = javaCmd
31+
println("fileRoot: " + fileRoot)
32+
println("mainClass: " + mainClass)
33+
}
3134
compileTimeError = testFor('CompileTimeError')
3235
throwsException = testFor('ThrowsException')
3336
errorOutputExpected = testFor('ErrorOutputExpected')
@@ -58,6 +61,7 @@ class Tags {
5861
if(tagline.getCount()) {
5962
def rtrim = tagline[0].reverse().dropWhile{ it != '}'}.reverse()[0..-2]
6063
def ltrim = rtrim - ("// {" + marker)
64+
ltrim = ltrim.replaceAll("//", " ")
6165
return ltrim.trim()
6266
} else {
6367
println "Searching for: " + re

0 commit comments

Comments
 (0)