Skip to content

Instantly share code, notes, and snippets.

@gki
Created October 2, 2015 04:33
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 gki/1b4026097008c77b3f40 to your computer and use it in GitHub Desktop.
Save gki/1b4026097008c77b3f40 to your computer and use it in GitHub Desktop.
[Gradle] get project path
task printpath << {
println "current project path: $projectDir"
def parentDirPath = parent.projectDir
println "parent project path: $parentDirPath"
def rootDirPath = rootProject.projectDir
println "root project path: $rootDirPath"
println "root project path: $rootDir" // this will be same as above.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment