Skip to content

Instantly share code, notes, and snippets.

@esycat
Last active June 6, 2018 21:48
Show Gist options
  • Save esycat/5452669 to your computer and use it in GitHub Desktop.
Save esycat/5452669 to your computer and use it in GitHub Desktop.
An example Gradle build configuration that shows that `ext` does not always point to the same object as `project.ext`. The assertion on line 10 fails.
assert(project.ext == ext)
// assigning some values just for testing
project.ext.set('a', 'a-val')
ext.set('b', 'b-val')
assert(project.ext == ext)
task test() {
assert(project.ext == ext)
doLast {
assert(project.ext == ext)
}
}
assert(project.ext == ext)
@esycat
Copy link
Author

esycat commented Apr 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment