How Extract Properties in Build Gradle

issue-resolved

(David Amador Pérez) #1

Hi!

I have a problem with the extraction of some properties and I don`t known how solve it.

I’m going to try explain with a example:

In my project I have in the build.gradle some task and one operation how this:

building jobs{
projectName= ‘example’
}

I don’t know If this is a task because it hasn’t the word “task”.

I have one task where I want use the value of property “projectName”.

task checkFunctional{

string TaskName= (value of property “projectName”)

example exa= new Example (TaskName)
}

¿How could I do it? ¿Can someone help me?

The property is also in the file build.gradle (not in localProperties or properties.yaml)

Thanks so much.