This message was deleted.
# community-support
s
This message was deleted.
v
Unfortunately, you cannot create a toolchain programmatically yet. Please vote for and watch https://github.com/gradle/gradle/issues/16245. What you can do though, is to configure it manually. For example configuring
options.forkOptions.executable
on a
JavaCompile
task. You most probably then also have some of the rare cases where you also need to add an explicit
dependsOn
, as that property is a plain
String
and thus cannot carry implicit task dependencies.
m
thanks
v
Actually, even then you should probably not use explicit dependsOn, but define the task output as input files, so that your task is out of date if the built JDK changed, if that is what you want.