-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
As a follow-up from #10 I'd like to discuss what's the best (read: pro) way to implement an external Java command line tool launcher. A requirement for such a feature is that it resolves tool's dependencies and executes the tool in its own VM with custom main parameters.
What I'd like to write in a "build.pro" file is something like this pseudo-code:
ExternalTool junit = ExternalTool.builder().withName("junit").withDependencies(list(
"org.junit.platform:junit-platform-console-standalone:1.0.0-SNAPSHOT"
)).build()
int code = junit.start("--selectTag", "fast")
if (code == 0) code = junit.start("--selectTag", "slow")
// ... handle failures/erros/etc
Or with google-java-format as another example:
ExternalTool format= ExternalTool.builder().withName("format").withDependencies(list(
"com.google.googlejavaformat:google-java-format:1.3"
)).build()
format.start(Pro.allJavaSourceFilesAsFlatStringArray())
On the disk, I imagine following runtime directories/files:
deps/
external-tool/
junit/ (name either generated or given by user)
junit.platform.console.standalone.jar
format/
google.java.format.jar
guava.jar
errorprone.jar
Can I (re-)use the existing "runner" plugin to achive this goal?
Note: there's no dependency of project's modules to the external tools.
Metadata
Metadata
Assignees
Labels
No labels