Last active
March 2, 2020 11:22
-
-
Save shivam340/35ff699c45e497c2ebe847a6f6982557 to your computer and use it in GitHub Desktop.
gradle properties example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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