Hi,
I have a project with subprojects, and I want to define that the manifest file for all subproject jars contains the same format of metadata (but eg. with different versions):
The subproject’s build script runs after the root project, that’s why the properties are not there yet. You can work around this by making sure you evaluate them lazily:
BTW, there already is a version attribute on the Gradle project by default, no need to design your own
I tried your suggestion, using “${…}”, but this still doesn’t work:
A problem occurred evaluating root project 'Name'.
> Could not find property 'tstamp' on project ':commonLib'.
You are of cause right about the project version, I will change that.
Perhaps my question is wrong. What i want to achieve, is define a template for jar generation, where certain things are always set in the same way, eg. the “Implementation-Version” should always contain the SVN revision, but the revision might be different for each subproject (different repositories!). On the other hand, the “Implementation-vendor” should always be the same, and I do not want to define it in each build.gradle file.