File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ java {
2525compileJava. options. encoding = " UTF-8"
2626compileTestJava. options. encoding = " UTF-8"
2727
28+ ext {
29+ jdflibjVersion = ' 2.+'
30+ }
31+
2832publishing {
2933 publications {
3034 mavenJava(MavenPublication ) {
@@ -116,13 +120,24 @@ javadoc {
116120 }
117121}
118122
123+ afterEvaluate {
124+ def jdflibj = configurations. runtimeClasspath. resolvedConfiguration. resolvedArtifacts. find {
125+ it. moduleVersion. id. group == ' org.cip4.lib.jdf' && it. moduleVersion. id. name == ' JDFLibJ'
126+ }
127+ if (jdflibj) {
128+ ext. jdflibjResolvedVersion = jdflibj. moduleVersion. id. version
129+ }
130+ }
131+
119132processResources {
120- filesMatching([' **/*.properties' ]) {
133+ def version = project. hasProperty(' jdflibjResolvedVersion' ) ? project. jdflibjResolvedVersion : jdflibjVersion
134+ filesMatching([' **/*.properties' , ' **/index.html' ]) {
121135 filter(ReplaceTokens , tokens : [
122136 ' name' : project. properties[' description' ],
123137 ' version' : project. properties[' version' ],
124138 ' artifactId' : project. properties[' name' ],
125- ' timestamp' : new Date (). format(' yyyy-MM-dd HH:mm:ssZ' )
139+ ' timestamp' : new Date (). format(' yyyy-MM-dd HH:mm:ssZ' ),
140+ ' jdflibj.version' : version
126141 ])
127142 }
128143}
Original file line number Diff line number Diff line change @@ -272,8 +272,8 @@ <h1>FixJDF</h1>
272272 < div class ="col-12 ">
273273 < small >
274274 < b > JDFToolbox</ b >
275- build ${build} (${ timestamp} )
276- < i > based on JDFLibJ ${ jdflibj.version} </ i >
275+ build @version@ (@ timestamp@ )
276+ < i > based on JDFLibJ @ jdflibj.version@ </ i >
277277 </ small >
278278 </ div >
279279 </ div >
You can’t perform that action at this time.
0 commit comments