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 c644768 commit 90505ab
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 @@ -16,7 +16,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 @@ -151,9 +151,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]}"
}

0 comments on commit 90505ab

Please sign in to comment.