Skip to content

Commit

Permalink
SDGF-151: Add versions to javadoc header
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Johnson authored and kohlmu-pivotal committed Oct 12, 2023
1 parent e640920 commit 75f9852
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions spring-data-vmware-gemfire/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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
}

Expand Down Expand Up @@ -114,9 +114,17 @@ repositories {
}

String getGemFireBaseVersion() {
def split = "${gemfireVersion}".split("\\.")
return getBaseVersion(gemfireVersion)
}

String getSpringDataBaseVersion() {
return getBaseVersion(springDataGeodeVersion)
}

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]}"
}

0 comments on commit 75f9852

Please sign in to comment.