Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions languages/java/tasks.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
[
{
"label": "Run $ZED_CUSTOM_java_class_name",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; if [ -f pom.xml ]; then mvn clean compile exec:java -Dexec.mainClass=$c; elif [ -f gradlew ]; then ./gradlew run -PmainClass=$c; else >&2 echo 'No build system found'; exit 1; fi;",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; if [ -f pom.xml ]; then ./mvnw clean compile exec:java -Dexec.mainClass=$c; elif [ -f gradlew ]; then ./gradlew run -PmainClass=$c; else >&2 echo 'No build system found'; exit 1; fi;",
"use_new_terminal": false,
"reveal": "always",
"tags": ["java-main"]
"tags": ["java-main"],
"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"]
}
}
},
{
"label": "Test $ZED_CUSTOM_java_class_name.$ZED_CUSTOM_java_method_name",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; m=\"$ZED_CUSTOM_java_method_name\"; if [ -f pom.xml ]; then mvn clean test -Dtest=\"$c#$m\"; elif [ -f gradlew ]; then ./gradlew test --tests $c.$m; else >&2 echo 'No build system found'; exit 1; fi;",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; m=\"$ZED_CUSTOM_java_method_name\"; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$c#$m\"; elif [ -f gradlew ]; then ./gradlew test --tests $c.$m; else >&2 echo 'No build system found'; exit 1; fi;",
"use_new_terminal": false,
"reveal": "always",
"tags": ["java-test-method"]
"tags": ["java-test-method"],
"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"]
}
}
},
{
"label": "Test class $ZED_CUSTOM_java_class_name",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; if [ -f pom.xml ]; then mvn clean test -Dtest=\"$c\"; elif [ -f gradlew ]; then ./gradlew test --tests $c; else >&2 echo 'No build system found'; exit 1; fi;",
"command": "c=\"$ZED_CUSTOM_java_package_name.$ZED_CUSTOM_java_class_name\"; if [ -f pom.xml ]; then ./mvnw clean test -Dtest=\"$c\"; elif [ -f gradlew ]; then ./gradlew test --tests $c; else >&2 echo 'No build system found'; exit 1; fi;",
"use_new_terminal": false,
"reveal": "always",
"tags": ["java-test-class"]
"tags": ["java-test-class"],
"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"]
}
}
},
{
"label": "Run tests",
"command": "if [ -f pom.xml ]; then mvn clean test; elif [ -f gradlew ]; then ./gradlew test; else >&2 echo 'No build system found'; exit 1; fi;",
"command": "if [ -f pom.xml ]; then ./mvnw clean test; elif [ -f gradlew ]; then ./gradlew test; else >&2 echo 'No build system found'; exit 1; fi;",
"use_new_terminal": false,
"reveal": "always"
"reveal": "always",
"shell": {
"with_arguments": {
"program": "/bin/sh",
"args": ["-c"]
}
}
}
]