Can I access within the subprojects block , what artifactoryPublish.skip has been set to in a specific subproject?

jar {
doFirst {
into("/META-INF/maven/$$") {
from { generatePomFileForMavenJavaPublication }
rename “.*”, “pom.xml”
The above is my subprojects block. I wanted to avoid using and use the property set in that specific subproject. I can use custom properties but wanted to know if artifactoryPublish.skip can be fetched for that subproject and the actions can be set accordingly.
Thank you!

I figured it out.
if (project.hasProperty(“artifactoryPublish”) && !project.getProperty(“artifactoryPublish”).skip)