Slackbot
10/27/2023, 1:12 PMReuben Firmin
10/27/2023, 1:14 PMReuben Firmin
10/27/2023, 1:15 PM/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/META-INF/ DELETE backend5.kotlin_module
/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/ah/view/components/ DELETE Card.class
/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/ DELETE,ISDIR META-INF
/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/ah/view/components/ CREATE Card.class
/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/ah/view/components/ MODIFY Card.class
/home/rfirmin/code/startup/frameworkrnd/backend3/build/classes/kotlin/jvm/main/ CREATE,ISDIR META-INFVampire
10/27/2023, 1:40 PMrun task like you do, does your run task finish, or does it run continuously.
I suspect the latter, in which -t will not do what you suspect. -t when the build finished watches for tasks with file inputs and if the inputs changed rerun the build. But if the run task is still running, the -t functionality does not kick in as the build is not yet finished. -t does not abort a running task.Reuben Firmin
10/27/2023, 1:52 PMtasks.named<JavaExec>("run") {
// val main by sourceSets.getting
// println(main.output.asPath)
// inputs.files(main.allSource, main.output)
outputs.upToDateWhen { false }
}
...and still no changes are picked up.
Re -t are you saying I should not include -t? Without it, no difference it seemsVampire
10/27/2023, 1:56 PMoutputs.upToDateWhen { false } is not necessary, the run task does not have outputs by default anyway.
Regarding -t of course it makes not difference. I told you that it does not work for your intended use-case and there is no way to achieve what you want. As long as the run task is still running, the build is still running and there is no "automatically abort running task when condition X is fulfilled" functionality.Reuben Firmin
10/27/2023, 1:58 PMVampire
10/27/2023, 2:00 PMrun task would end, then -t would work in rerunning the build if input files changed.