Skip to content

Instantly share code, notes, and snippets.

@outofcoffee
Created June 11, 2017 11:44
Show Gist options
  • Save outofcoffee/a5ec8af7e1a4f79fea7abd4a604449d0 to your computer and use it in GitHub Desktop.
Save outofcoffee/a5ec8af7e1a4f79fea7abd4a604449d0 to your computer and use it in GitHub Desktop.
Load project version from properties file
def projectVersion = new File("${project.rootDir}/version.properties").withInputStream { is ->
new Properties().with { load((InputStream) is); delegate }
}['version']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment