I have a Gradle-built project which builds the JPA APIs. Part of the artifact name is the JPA version (we use the artifact version for our build number). I have that set up in settings.xml as:
rootProject.name = 'hibernate-jpa-2.1-api'
However, there are a few references to the JPA version in build.gradle as well. So in the interest of defining things in one place I realy wanted to do something like:
rootProject.ext.jpaVersion = "2.1"
rootProject.name = 'hibernate-jpa-2.1-api'
And then be able to reference rootProject.ext.jpaVersion in build.gradle as well. However, Gradle did not like this.
Is there a strategy for accomplishing what I want?