# Get ProjectModel with a property using tooling api

**URL:** <https://discuss.gradle.org/t/get-projectmodel-with-a-property-using-tooling-api/36164>\
**Category:** Help/Discuss\
**Created:** [May 20, 2020, 10:06am UTC](https://discuss.gradle.org/t/get-projectmodel-with-a-property-using-tooling-api/36164 "2020-05-20T10:06:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matans](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@matans](https://discuss.gradle.org/u/matans)\
**Post date:** [May 20, 2020, 10:06am UTC](https://discuss.gradle.org/t/get-projectmodel-with-a-property-using-tooling-api/36164/1 "2020-05-20T10:06:38Z")

</div>

Hi,

I am using gradle tooling api and I encountered the following scenario.  
There is a project that applies a certain plugin **P** which creates a task **T** only if the property **shouldApplyP** is passed.

Hence, if you will run `./gradlew tasks --all` you won’t see task **T** , but if you will run  
`./gradlew -PshouldApplyP tasks --all` you will see task **T**.

In gradle tooling api, once a `ProjectConnection` has created I can do  
`connection.getModel(GradleProject.class).getTasks()`

But I can’t see this specific task. Is there a way to pass the project connection this property  
`-PshouldApplyP` so it will be presented in the `getTasks()` method?
