This message was deleted.
# community-support
s
This message was deleted.
1
c
does it have to depend on the language-specific compile task(s)? Perhaps depending on lifecycle tasks (e.g
assemble
) is cleaner
t
dependsOn(classes)
, but ideally you'd rather use the source set's output as input to the task
j
assemble
is too late — it’s an instrumentation task I’m talking about.
@Thomas Broyer I am actually relying on `sourceSet`’s output currently having the
dependsOn(sourceSet.classesTaskName)
. Seems like something’s still wrong on my side — the instrumentation task is run too early and classes aren’t written yet:
Copy code
...
> Task :plugin:core:classes
> Task :plugin:core:setupInstrumentCode

> Task :plugin:core:instrumentCode FAILED
[ant:instrumentIdeaExtensions] /Users/hsz/Projects/3rd/Perl5-IDEA/plugin/core/src/main/java/com/perl5/lang/perl/idea/configuration/settings/sdk/Perl5SdkPanel.form: Class to bind does not exist: com.perl5.lang.perl.idea.configuration.settings.sdk.Perl5SdkPanel
But the second run works fine as the
plugin:core:classes
task is already `UP-TO-DATE`:
Copy code
...
> Task :plugin:core:classes UP-TO-DATE
> Task :plugin:core:setupInstrumentCode
> Task :plugin:core:instrumentCode
> Task :plugin:core:classpathIndexCleanup

BUILD SUCCESSFUL in 1s
t
Note that by "use the source set's output" I rather meant something like
classesToProcess.from(fileTree(sourceSet.output.classesDirs))
and not using
dependsOn
at all. But using
dependsOn(source.SetclassesTaskName)
should work too. I would print the inputs and whether they exist or not at the start of the task (possibly in a
doFirst
) to try to debug this.
👍 1
j
Ok, all classes were available for the task, but then ant taks was spin up and missed them. Anyways, thanks to your latest comment I went into the proper direction. Thanks! 🙂