Skip to content

Instantly share code, notes, and snippets.

@shivam340
Last active March 2, 2020 11:22
Show Gist options
  • Save shivam340/35ff699c45e497c2ebe847a6f6982557 to your computer and use it in GitHub Desktop.
Save shivam340/35ff699c45e497c2ebe847a6f6982557 to your computer and use it in GitHub Desktop.
gradle properties example
# gradle(JVM) arguments
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048m
# system properties
systemProp.gradle.wrapperUser=myuser
systemProp.gradle.wrapperPassword=mypassword
systemProp.greetMessageSystem="hello : System property"
# project properties
greetMessageProject="Hello, Good Morning."
// Project properties can be accessed via delegation.
val greetMessageProject: String by project
val greetMessageSystem: String by System.getProperties()
// We can also access properties using property object.
val greet = project.property("greetMessage")
val message = System.getProperty("greetMessage")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment