ext {
springVersion = "3.1.0.RELEASE"
emailNotification = "[email protected]"
}
Above code is the snippet of build.gradle
I understand that call ext method with { } closure parameter.
it's right?
So I think gradle is accessing springVersion and emailNotification.
I'm gonna verify my assumption with below code
def ext(data) {
println data.springVersion
}
ext {
springVersion = "3.1.0.RELEASE"
emailNotification = "[email protected]"
}
but run that code
below Error occured.
groovy.lang.MissingPropertyException: No such property: springVersion for class: Test
do you explain ext and code block specifically?
See more detail of this Question&Answers :
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…