I am trying to build a custom plugin.
I want to have a property in build.gradle say myMainClass and i like to get the value in my plugin…
i have tried using myPluginConventions and also project.extensions.create but i am unable to get the property from build.gradle.
Can anyone tell me what is the good way to get property inside custom plugin ?
in Extensions i used project.extensions.creaet (“myblock”, MyBlockPluginConvension)
MyBlockPluginConvension is having a variable myMainClass
I tried to get the value in my plugin as project.myblock.myMainClass Its not working!
And for convensions project.convention.plugins.myblock = new MyBlockPluginConvension()
MyBlockPluginConvension is having a variable myMainClass and a closure myblock
inside plugin i am trying myBlockPluginConvension.myMainClass
both are not working !