Replies: 3 comments 7 replies
-
|
IMO this should be fixed in the following manner:
This is for the problem at hand. |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
@ata-nas, |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Team agreement is to follow the recommendation @ata-nas documented as follows:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Topic
We have some subprojects that have repeating
gradletask names, for example in:serverand in:suiteswe have tasks namedcreateDockerImage.To Discuss
./gradlew createDockerImageby default this will run the task both for:serverand:suitesneed-to-knowsolutionDiscussion
This is a discussion we initially had with @mattp-swirldslabs and @AlfredoG87:
Currently we have some subprojects that have repeating
gradletask names, for example in:serverand in:suiteswe have tasks namedcreateDockerImage. This means that when we are in repo root and we run./gradlew createDockerImageby default this will run the task both for:serverand:suites. Called without any qualifiers, any project that has a task namedcreateDockerImage(or any other task duplicated task name), that task will be executed. This means that we need to use:server:createDockerImageif we want to execute the task only for:serverwhich is aneed-to-knowsolution and is not a good thing, since if we see thebuild.gradle.ktsof:serverand we see thecreateDockerImagetask, we might not be aware that the same exists for other subproject. This could mislead us and we could misuse the running of the given (any duplicated)gradletask. If for example we have a task that would run a project, lets call itrunProjectfor example, and we reuse it in a couple of subprojects, running./gradlew runProjectfrom repo root would attempt to run two projects at once which might be something that should never happen (especially when we havegh actionsjobs that are related to our ci/cd process), but we could easily miss that this is happening, since there could be no problems visible initially. And so would it be better to simply name the tasksserverRunProjectandsuitesRunProjecta better solution than the need to know solution of duplicating the task name and relying on theneed-to-knownature of it? Also, when do we actually want to have duplicated task names and if we have such, is it possible to extract and reuse them instead of defining these tasks per project (if applicable)?As far as overhead, running things that we should not run due to task name duplication and not having knowledge about it, should theoretically be only once, since
gradleis cached (please correct me if I am wrong)?This being said, here are a couple of questions I think we should discuss:
need-to-knowsolution a valid concern, or is the reliance on thorough documentation solving the issue and it is a fault of the user if they misuse?need-to-knownature of the issue?gradletasks?Beta Was this translation helpful? Give feedback.
All reactions