From 4e60a944658e0c5c85e68af0bac9d8d455ae105c Mon Sep 17 00:00:00 2001 From: Patrick Johnson Date: Thu, 12 Oct 2023 15:27:15 -0700 Subject: [PATCH] SDGF-151: add versions to javadoc header --- spring-data-vmware-gemfire/build.gradle | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/spring-data-vmware-gemfire/build.gradle b/spring-data-vmware-gemfire/build.gradle index 289cf537..028fe5b9 100644 --- a/spring-data-vmware-gemfire/build.gradle +++ b/spring-data-vmware-gemfire/build.gradle @@ -21,7 +21,7 @@ java { } javadoc { - title = "Spring Data for VMware GemFire Java API Reference" + title = "Spring Data ${getSpringDataBaseVersion()} for VMware GemFire ${getGemFireBaseVersion()} Java API Reference" failOnError=false } @@ -154,9 +154,17 @@ repositories { } String getGemFireBaseVersion() { - def split = "${gemfireVersion}".split("\\.") + return getBaseVersion(gemfireVersion) +} + +String getSpringDataBaseVersion() { + return getBaseVersion(springDataVersion) +} + +static String getBaseVersion(String version) { + def split = "${version}".split("\\.") if (split.length < 2) { - throw new RuntimeException("gemfireVersion is malformed") + throw new RuntimeException("version '$version' is malformed") } return "${split[0]}.${split[1]}" }