@@ -31,12 +31,10 @@ def getVersion = { boolean considerSnapshot ->
31
31
String snapshot = " "
32
32
33
33
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"
35
35
}. standardOutput. asText. get(). trim()
36
36
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 ]*))?/
40
38
def matcher = versionStr =~ pattern
41
39
42
40
if (matcher. find()) {
@@ -145,8 +143,6 @@ jar {
145
143
}
146
144
147
145
tasks. register(' xmldoc' , Javadoc ) {
148
- println getVersion( true )
149
-
150
146
def outFile = reporting. file(
151
147
version. endsWith(" -SNAPSHOT" )
152
148
? " xmlDoclet/javadoc_snapshot.xml"
@@ -166,11 +162,12 @@ tasks.register('xmldoc', Javadoc) {
166
162
// source += fileTree(layout.buildDirectory.dir("generated/jjtree/net/sf/jsqlparser/parser").get()) {
167
163
// include("**/*.java")
168
164
// }
165
+
169
166
// beware: Gradle deletes this folder automatically and there is no switch-off
170
167
destinationDir = reporting. file(" xmlDoclet" )
171
168
options. docletpath = configurations. xmlDoclet. files as List
172
169
options. doclet = " com.github.markusbernhardt.xmldoclet.XmlDoclet"
173
- title = " API " + getVersion( ! System . getenv( " RELEASE " ) )
170
+ title = " API $v ersion "
174
171
options. addBooleanOption(" rst" , true )
175
172
options. addBooleanOption(" withFloatingToc" , Boolean . parseBoolean(System . getenv(). getOrDefault(" FLOATING_TOC" , " true" )))
176
173
options. addStringOption(" basePackage" , " net.sf.jsqlparser" )
0 commit comments