简体   繁体   中英

Gradle: JavaExec in a single process

With gradle's JavaExec task, I can execute a main method, in a child process, and pass string arguments to it. Is there an equivalent task that allows running an arbitrary Java (or Groovy) method within the gradle process, and therefore allows passing object arguments?

Ultimately, what I would like to do is configure object properties (not just strings) using an approach similar to this , and pass those properties to any method on the runtime classpath ( classpath = sourceSets.main.runtimeClasspath ).

唯一实现此atm的方法是将您的依赖项直接添加为buildscript类路径依赖项,并在您的任务中直接调用方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM