Task 'install' not found in root project

i can run gradle build command successfully but when i run ‘gradle build install’ or ‘gradle install’ i get error - Task ‘install’ not found in root project. Gradle version i am using is 7.0

Please advise on how can i resolve the error.

Obviously the build you are trying to run does not have a task with that name.
If you search for something like the install goal in Maven, chances are you have publishToMavenLocal task available.

Thank you Bjorn. Will I be able to use install task if i use another gradle version. In that case, will you kindly suggest me which gradle version shall i use.
Thank you again.

My name is not Bjorn, but Björn or Bjoern. :wink:

That’s not a question of Gradle version, but of the build you are running.
Each build can define a task called install by just writing one line in the build script.
The task will then just not do anything.
You can also apply some plugin that adds an install task to a build with some semantic, but that is totally up to the author of a build script.
No Gradle version will by default add any task to any build besides the most basic utility tasks like tasks, or projects.

If this is a foreign build you want to run, look at its documentation how to run it or ask the author.
If you are trying to create a build, you should maybe look at the user guide and sample projects.