Skip to content

Commit eb80be8

Browse files
committed
Execute run_antlr4 same as ya make
Execute run_antlr4 same as ya make commit_hash:069135ba18f9d8584552ddfcd755d6f7edb9c0be
1 parent f43d13f commit eb80be8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

build/export_generators/ide-gradle/codegen_run_program.jinja

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@ val {{ varprefix }}{{ custom_run['_object_index'] }} = tasks.register<Exec>("{{
1010
workingDir({{ PatchRoots(custom_run.cwd, false, custom_run['_object_index']) }})
1111
{%- else %}
1212
workingDir({{ PatchRoots(codegenBindir, false, custom_run['_object_index']) }})
13+
{%- endif -%}
14+
15+
{%- set args = custom_run.command -%}
16+
{%- if args|first == "run_antlr4" -%}
17+
{%- set args = [ jdk_path + "/bin/java", "-jar", custom_run.jar ] + args|reject('eq', "run_antlr4") -%}
1318
{%- endif %}
1419

1520
commandLine("bash", "-c", listOf(
16-
{%- for arg in custom_run.command %}
21+
{%- for arg in args %}
1722
{{ PatchArg(arg, custom_run['_object_index'], custom_run.depends, custom_run.outputs) }},
1823
{%- endfor %}
1924
).joinToString(" "))
2025

26+
{%- if custom_run.command|first == "run_antlr4" and custom_run.jar %}
27+
inputs.files({{ PatchRoots(custom_run.jar, true) }})
28+
{%- endif -%}
2129
{%- if custom_run.depends|length -%}
2230
{%- for depend in custom_run.depends|unique %}
2331
inputs.files({{ PatchRoots(depend, true) }})

build/export_generators/ide-gradle/generator.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ custom_runs-cmake_packages="list"
109109
custom_runs-cmake_packages-ITEM="dict"
110110
custom_runs-cmake_packages-name="str"
111111
custom_runs-cmake_packages-components="list"
112+
custom_runs-jar="str"
112113

113114
javac-flags="list"
114115
kotlinc-flags="list"

0 commit comments

Comments
 (0)