Bob Ham
10/31/2025, 2:44 PMtask.named to create my bits but I get an error: The task '...' (org....Task) is not a subclass of the given typeVampire
10/31/2025, 2:49 PMdependsOn, myBits must run before originalTask as originalTask depends on myBits.
The shouldRunAfter or also mustRunAfter are only ordering constraints in case no dependsOn exists between those tasks.
How to do it right heavily depends on what you want to do.
If you for example want to run myBits after originalTask automatically but only if originalTask was successful, configure myBits as finalizedBy of originalTask and make myBits depends on orignalTask.
But if myBits modifies the output of originalTask then you should not even ever consider doing that. No two task should ever touch the same output files.
For that, you could for example simply register a doLast action to the originalTask, so that your "additional bits" are actually part of the task action(s) of originalTask.Bob Ham
10/31/2025, 2:51 PMdoLast action to the originalTask
What I'm asking is: how do I do that? ๐Bob Ham
10/31/2025, 2:53 PMVampire
10/31/2025, 2:55 PMtasks.named("originalTask") {
doLast {
...
}
}Vampire
10/31/2025, 2:55 PMBob Ham
10/31/2025, 2:55 PMNiels Doucet
10/31/2025, 3:04 PMtasks not taskVampire
10/31/2025, 3:06 PMI already said I tried that and it causes an errorNo, you did not. You tried
tasks.named<MyBits>("originalTask")
But the task orignalTask is not of type MyBits and that is what that error tells you.Vampire
10/31/2025, 3:06 PMBob Ham
10/31/2025, 3:07 PMYou tried
No, I did notCopy codetasks.named<MyBits>("originalTask")
Bob Ham
10/31/2025, 3:08 PMtasks.named("originalTask", PythonTask) {Vampire
10/31/2025, 3:08 PMVampire
10/31/2025, 3:08 PMorignalTask is not of type PythonTaskBob Ham
10/31/2025, 3:09 PMBut the taskSo the question is outstanding: how do I "simply register ais not of typeorignalTaskand that is what that error tells you.MyBits
doLast action to the originalTask "?Vampire
10/31/2025, 3:09 PMBob Ham
10/31/2025, 3:09 PMBob Ham
10/31/2025, 3:09 PMVampire
10/31/2025, 3:09 PMVampire
10/31/2025, 3:10 PMBob Ham
10/31/2025, 3:10 PMVampire
10/31/2025, 3:10 PMBob Ham
10/31/2025, 3:10 PMVampire
10/31/2025, 3:11 PMVampire
10/31/2025, 3:11 PMBob Ham
10/31/2025, 3:12 PMRight in my first replyAgain, that's not helpful
Bob Ham
10/31/2025, 3:12 PMVampire
10/31/2025, 3:12 PMBob Ham
10/31/2025, 3:13 PMVampire
10/31/2025, 3:13 PMBob Ham
10/31/2025, 3:14 PMVampire
10/31/2025, 3:14 PMVampire
10/31/2025, 3:14 PMBob Ham
10/31/2025, 3:15 PMBob Ham
10/31/2025, 3:15 PMVampire
10/31/2025, 3:16 PMVampire
10/31/2025, 3:16 PMdoLast action instead.Bob Ham
10/31/2025, 3:17 PMVampire
10/31/2025, 3:17 PMBob Ham
10/31/2025, 3:17 PMBob Ham
10/31/2025, 3:17 PMVampire
10/31/2025, 3:17 PMBob Ham
10/31/2025, 3:17 PMBob Ham
10/31/2025, 3:17 PMVampire
10/31/2025, 3:17 PMBob Ham
10/31/2025, 3:18 PMBob Ham
10/31/2025, 3:18 PMVampire
10/31/2025, 3:18 PMBob Ham
10/31/2025, 3:18 PMVampire
10/31/2025, 3:20 PMdependsOn which is bad-practice for such cases anyway.Bob Ham
10/31/2025, 3:20 PMBob Ham
10/31/2025, 3:20 PMVampire
10/31/2025, 3:21 PMBob Ham
10/31/2025, 3:22 PMI'm not hoarding any informationI disagree.
Bob Ham
10/31/2025, 3:22 PMBob Ham
10/31/2025, 3:22 PMVampire
10/31/2025, 3:24 PMBob Ham
10/31/2025, 3:24 PMI don't see your point at allMaybe a little bit more time than just a couple of minutes. Maybe let it percolate for a few days.
Vampire
10/31/2025, 3:28 PMBob Ham
10/31/2025, 3:29 PMI will give it a few days and then say exactly the same.If you've already decided that you won't change your mind then you aren't actually considering.
Bob Ham
10/31/2025, 3:30 PM% of people I genuinely try to help with my best effort cannot cope with my way of helpingThat's very telling. Maybe pay attention to the fact that any such people at all exist.
Bob Ham
10/31/2025, 3:31 PMmaybe you should also give the communication a few days thought and decide for yourself whether it was really me that was the problemI will. I'll even come back and tell you about my thoughts.
Niels Doucet
10/31/2025, 3:43 PMRegarding the question, as you said,dependsOnmust run beforemyBitsasoriginalTaskdepends onoriginalTask.myBits
Theor alsoshouldRunAfterare only ordering constraints in case nomustRunAfterexists between those tasks.dependsOn
How to do it right heavily depends on what you want to do.
If you for example want to runIf you need any specific guidance on how to configure this dependency relation between youraftermyBitsautomatically but only iforiginalTaskwas successful, configureoriginalTaskasmyBitsoffinalizedByand makeoriginalTaskdepends onmyBits.orignalTask
myBits task and the originalTask, please show what you tried and the specific error you're getting.
For reference: https://docs.gradle.org/current/userguide/controlling_task_execution.html#sec:ordering_tasksBob Ham
10/31/2025, 3:45 PMVampire
10/31/2025, 3:47 PMIf you've already decided that you won't change your mind then you aren't actually considering.
So you are calling me a liar now? Do you really think this is the best way to act in an open community (or any group of people)? If I say I'll think about it, I will. That I came to a conclusion once does not mean I come to the same conclusion again, even though it's possible. But your behavior makes it hard to come to a different conclusion.
That's very telling. Maybe pay attention to the fact that any such people at all exist.
That doesn't mean anything, because none can communicate in a way that targets each and every person in the world, that's just impossible. So no matter what you do, there will always be people that cannot cope with it, that's a simple fact. Also, when having similar conversations there are usually also people sympathizing in private messages, asking how I can stay that calm and that they agree to me. They just don't say it in the open because they don't want to become a target themselves.
Bob Ham
11/06/2025, 4:17 PMmaybe you should also give the communication a few days thought and decide for yourself whether it was really me that was the problemSo I gave it some thought. I think it was definitely you that was the problem. I only just saw your last comment from Friday so I'll respond:
So you are calling me a liar now?No, just pointing out that if you decide the outcome of some planned thinking beforehand then the planned thinking will only lead to the decided outcome.
Do you really think this is the best way to act in an open community (or any group of people)?I don't know what the best way to act is in the face of people like yourself. I'm just doing the best I can in the challenging circumstances of interacting with people like you.
Vampire
11/06/2025, 5:25 PM> So I gave it some thought. I think it was definitely you that was the problem.Me too, and I'm also pretty confident still, that the problem is not me.
> So you are calling me a liar now?
No, just pointing out that if you decide the outcome of some planned thinking beforehand then the planned thinking will only lead to the decided outcome.Ok, you did not say I'm a liar, you implied I'm a liar. Because if you would not have thought that I decided already, you would not have written that comment. So by writing that comment you implied (at least that is what receivers of that statement most likely interpret) that I decided already and thus implied that I'm a liar when saying I will think about it and consider. If it walks like a duck and sounds like a duck, it usually is a duck, even if someone states it is something different.
I don't know what the best way to act is in the face of people like yourself. I'm just doing the best I can in the challenging circumstances of interacting with people like you.If that was the best you can do when communicating in an open community with people trying to help you with your problems in their spare time, then you should maybe take some communications training. ๐ Anyway, as we now clarified our outcomes of thinking about it, I'm back to my originally last statement and will not continue this discussion any further. ๐
Bob Ham
11/07/2025, 2:30 PMif you would not have thought that I decided alreadyYou stated what your conclusion would be ahead of time:
I will give it a few days and then say exactly the same.I'm not sure where the confusion is.
you implied ... that I decided already and thus implied that I'm a liarThere's no implication, I'm just reflecting what you've said yourself. I don't think you're a liar but I do think you're deluded.
Vampire
11/07/2025, 5:06 PMBob Ham
11/10/2025, 10:32 AM