@@ -31,12 +31,10 @@ def getVersion = { boolean considerSnapshot ->
3131 String snapshot = " "
3232
3333 def versionStr = providers. exec {
34- commandLine " git" , " --no-pager" , " describe" , " --tags" , " --always" , " --dirty=-SNAPSHOT"
34+ commandLine " git" , " --no-pager" , " -C " , project( ' :JSQLParser ' ) . projectDir, " describe" , " --tags" , " --always" , " --dirty=-SNAPSHOT"
3535 }. standardOutput. asText. get(). trim()
3636
37- println " Version String: $versionStr "
38-
39- def pattern = / jsqlparser-(?<major>\d *)\. (?<minor>\d *)(\. (?<patch>\d *))?(-(?<build>\d *)-(?<commit>[a-zA-Z\d ]*))?/
37+ def pattern = / (?<major>\d *)\. (?<minor>\d *)(\. (?<patch>\d *))?(-(?<build>\d *)-(?<commit>[a-zA-Z\d ]*))?/
4038 def matcher = versionStr =~ pattern
4139
4240 if (matcher. find()) {
@@ -145,8 +143,6 @@ jar {
145143}
146144
147145tasks. register(' xmldoc' , Javadoc ) {
148- println getVersion( true )
149-
150146 def outFile = reporting. file(
151147 version. endsWith(" -SNAPSHOT" )
152148 ? " xmlDoclet/javadoc_snapshot.xml"
@@ -166,11 +162,12 @@ tasks.register('xmldoc', Javadoc) {
166162// source += fileTree(layout.buildDirectory.dir("generated/jjtree/net/sf/jsqlparser/parser").get()) {
167163// include("**/*.java")
168164// }
165+
169166 // beware: Gradle deletes this folder automatically and there is no switch-off
170167 destinationDir = reporting. file(" xmlDoclet" )
171168 options. docletpath = configurations. xmlDoclet. files as List
172169 options. doclet = " com.github.markusbernhardt.xmldoclet.XmlDoclet"
173- title = " API " + getVersion( ! System . getenv( " RELEASE " ) )
170+ title = " API $v ersion "
174171 options. addBooleanOption(" rst" , true )
175172 options. addBooleanOption(" withFloatingToc" , Boolean . parseBoolean(System . getenv(). getOrDefault(" FLOATING_TOC" , " true" )))
176173 options. addStringOption(" basePackage" , " net.sf.jsqlparser" )
0 commit comments