Reputation: 91
I know how to get it if version is defined in application.properties, but how do I get it from build.gradle?
Upvotes: 3
Views: 3846
Reputation: 59699
The general flow is:
gradleVersion=${version}
. processResources
) to filter / expand those propertiesgradleVersion
property like any other Spring propertyNote that it'll require you to invoke Gradle in order to properly resolve the gradleVersion
property (as Gradle is the one putting the value in there). bootRun
should already depend on processResources
, so if you're using that you should be fine.
Upvotes: 2