Last active
June 6, 2018 21:48
-
-
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.
This file contains 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
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the explanation:
http://forums.gradle.org/gradle/topics/project_ext_and_ext_differ#reply_11889305