Slackbot
02/27/2023, 5:17 PMChris Lee
02/27/2023, 5:18 PMassemble
) is cleanerThomas Broyer
02/27/2023, 5:19 PMdependsOn(classes)
, but ideally you'd rather use the source set's output as input to the taskJakub Chrzanowski
02/27/2023, 5:19 PMassemble
is too late — it’s an instrumentation task I’m talking about.Jakub Chrzanowski
02/27/2023, 5:28 PMdependsOn(sourceSet.classesTaskName)
.
Seems like something’s still wrong on my side — the instrumentation task is run too early and classes aren’t written yet:
...
> 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`:
...
> Task :plugin:core:classes UP-TO-DATE
> Task :plugin:core:setupInstrumentCode
> Task :plugin:core:instrumentCode
> Task :plugin:core:classpathIndexCleanup
BUILD SUCCESSFUL in 1s
Thomas Broyer
02/27/2023, 5:38 PMclassesToProcess.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.Jakub Chrzanowski
02/27/2023, 8:43 PM