Linux command
gradle-properties 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all project properties
gradle properties
List with wrapper
./gradlew properties
Set property via command line
gradle build -PmyProp=value
Set multiple properties
gradle build -Pprop1=val1 -Pprop2=val2
说明
gradle properties displays all properties available in a Gradle project, including built-in properties and those defined in gradle.properties files. Properties can be set via command line with -P, through environment variables (ORG_GRADLE_PROJECT_name), or in gradle.properties files at project or user level.
参数
- -P_name_=_value_
- Set project property.
- -Dorg.gradle.project._name_=_value_
- Set property via system property.
FAQ
What is the gradle-properties command used for?
gradle properties displays all properties available in a Gradle project, including built-in properties and those defined in gradle.properties files. Properties can be set via command line with -P, through environment variables (ORG_GRADLE_PROJECT_name), or in gradle.properties files at project or user level.
How do I run a basic gradle-properties example?
Run `gradle properties` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -P_name_=_value_ do in gradle-properties?
Set project property.