Skip to content

Commit c2656dd

Browse files
authored
Kotlin: Tolerate kotlinc versions like 1.7.20-Beta
1 parent f3cc6ae commit c2656dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/kotlin-extractor/kotlin_plugin_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_single_version(fakeVersionOutput = None):
3838
if kotlinc is None:
3939
raise KotlincNotFoundException()
4040
versionOutput = subprocess.run([kotlinc, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stderr if fakeVersionOutput is None else fakeVersionOutput
41-
m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+) .*', versionOutput)
41+
m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+-?[a-zA-Z]*) .*', versionOutput)
4242
if m is None:
4343
raise Exception('Cannot detect version of kotlinc (got ' + str(versionOutput) + ')')
4444
current_version = version_string_to_tuple(m.group(1))

0 commit comments

Comments
 (0)