-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Extension Name: vscode-gradle
Extension Version: v3.12.4
OS Version: macOS Monterey
VSCode version: 1.70.2
Describe the bug
PR #1035 doesn't seem to have included support for input variables
To Reproduce
Define a gradle workflow and reference an input variable from the args, e.g.
{
"version": "2.0.0",
"tasks": [
{
"type": "gradle",
"script": "app:run",
"args": "-PfileToRun=${input:fileToRun}",
...
}
],
"inputs": [
{
"type": "pickString",
"id": "fileToRun",
"description": "What file do you want to run?",
"options": [
"File1",
"File2"
]
},
]
}
A possible build.gradle.kts might include...
application {
// Define the main class for the application.
mainClass.set("com.example." + project.findProperty("fileToRun").toString() + "Kt")
}
Expected behavior
the input variable should be dereferenced in the resulting command's arguments
Output from "Gradle for Java"
> :app:run
Error: Could not find or load main class com.example.${input:fileToRun}Kt
Caused by: java.lang.ClassNotFoundException: com.example.${input:fileToRun}Kt
Does the bug still exist if you disable all other extensions?
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working