Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfa9bef

Browse files
smowtonigfoo
authored andcommitted
Fix gradle homedir search
1 parent a6c504a commit dfa9bef

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

java/kotlin-extractor/build.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import shutil
77
import os
88
import os.path
9+
import sys
910

1011
kotlinc = 'kotlinc'
1112
javac = 'javac'
@@ -90,9 +91,9 @@ def compile_embeddable():
9091
x = subprocess.run(['gradle', 'getHomeDir'],
9192
check=True, capture_output=True)
9293
output = x.stdout.decode(encoding='UTF-8', errors='strict')
93-
m = re.match(
94-
r'.*\n> Task :getHomeDir\n([^\n]+)\n.*', output)
94+
m = re.search(r'(?m)^> Task :getHomeDir\n([^\n]+)$', output)
9595
if m is None:
96+
print("gradle getHomeDir output:\n" + output, file = sys.stderr)
9697
raise Exception('Cannot determine gradle home directory')
9798
gradle_home = m.group(1)
9899

0 commit comments

Comments
 (0)