Check Gradle properties in console

You can check the properties set for gradle using below command

gradle properties

If you want to know the gradle properties in details, run the below task in gradle

task  demo1{
 println "System Properties:" 
        System.properties.each { 
                println "   $it" 
        } 
 
        println "Project Properties:" 
        project.properties.each { 
                println "   $it" 
        } 
         
        println "Plugin Properties:" 
        project.plugins.each { 
                println "    plugin: $it" 
                it.properties.each { 
                        println "       $it" 
                } 
        }  
}

You can also find for a property using below command

task printProps {
    doLast {
        println "org.gradle.priority -> ${project.findProperty('org.gradle.priority') ?: 'Value is not set'}"
    }
}

Leave a Comment