Hi,
This question is a sub question from http://forums.gradle.org/gradle/topics/jacoco-gradle-taskdef-a-class-needed-by-class-org-jacoco-ant-instrumenttask-canno-t-be-found
The question is, is there a way (config, etc.) to let below code in gradle-launcher-2.2.1.jar start the process with custom -cp?
public DaemonStartupInfo startDaemon()
{
DefaultModuleRegistry registry = new DefaultModuleRegistry();
Set bootstrapClasspath = new LinkedHashSet();
bootstrapClasspath.addAll(registry.getModule(“gradle-launcher”).getImplementationClasspath().getAsFiles());
if (registry.getGradleHome() == null)
{
bootstrapClasspath.addAll(registry.getFullClasspath());
}
if (bootstrapClasspath.isEmpty()) {
throw new IllegalStateException(“Unable to construct a bootstrap classpath when starting the daemon”);
}
new JvmVersionValidator().validate(this.daemonParameters);
List daemonArgs = new ArrayList();
daemonArgs.add(this.daemonParameters.getEffectiveJavaExecutable());
List daemonOpts = this.daemonParameters.getEffectiveJvmArgs();
LOGGER.debug(“Using daemon opts: {}”, daemonOpts);
daemonArgs.addAll(daemonOpts);
daemonArgs.add("-cp");
daemonArgs.add(CollectionUtils.join(File.pathSeparator, bootstrapClasspath));
daemonArgs.add(GradleDaemon.class.getName());
daemonArgs.add(GradleVersion.current().getVersion());
daemonArgs.add(this.daemonDir.getBaseDir().getAbsolutePath());
daemonArgs.add(String.valueOf(this.daemonParameters.getIdleTimeout()));
daemonArgs.add(this.daemonParameters.getUid());
…
}