How to access project.ext variables from within buildscript section


(Abhijit Sarkar) #1
project.ext {
 jaxWsPluginVersion = "1.0-SNAPSHOT"
}
  buildscript {
 repositories {
  mavenCentral()
  mavenLocal()
 }
 dependencies {
  classpath(
    [group: "name.abhijitsarkar.webservices.jaxws.tools", name: "gradle-jaxws-plugin", version: "1.0-SNAPSHOT"]
    )
 }
}

What expression can I use to get jaxWsPluginVersion within buildscript?


(Abhijit Sarkar) #2

No one?


(Peter Niederwieser) #3

It’s impossible, because the ‘buildscript’ block gets evaluated before the rest of the build script. You can access an extra property declared within ‘buildscript’ from the rest of the build script, though.


Where can I learn how the build script is evaluated?
(Abhijit Sarkar) #4

Thanks Peter.