Skip to content

Instantly share code, notes, and snippets.

@calclavia
Forked from RX14/gist:6e04cd9fc71c52191def
Last active March 16, 2022 18:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calclavia/60b30c497adce5587f70 to your computer and use it in GitHub Desktop.
Save calclavia/60b30c497adce5587f70 to your computer and use it in GitHub Desktop.
Create property file with Gradle
def propertyFile = file "src/main/resources/META-INF/some.properties"
def props = new Properties()
propertyFile.withReader { props.load(it) }
props.setProperty("version", project.version)
propertyFile.withWriter { props.store(it) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment