if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
}
+ java {
+ // also include the generated Version.java
+ srcDirs += 'build/generated-sources'
+ }
}
test {
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
javadocs project(':poi-scratchpad')
}
+// generate and compile the file Version.java file
+task generateVersionJava() {
+ //dependsOn ':poi-ooxml:build', ':poi-integration:build', ':poi-excelant:build'
+
+ File fileIn = file("src/main/version/Version.java.template")
+ File fileOut = file("build/generated-sources/org/apache/poi/Version.java")
+
+ inputs.file fileIn
+ outputs.file fileOut
+
+ doLast {
+ String content = fileIn.text
+
+ content = content.replace("@VERSION@", version)
+ content = content.replace("@DSTAMP@", new Date().format('yyyyMMdd'))
+
+ fileOut.write content
+ }
+}
+compileJava.dependsOn 'generateVersionJava'
+
final String MODULE_NAME = 'org.apache.poi.poi'
final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$|batik-script)'
final Pattern MODULE_REGEX = ~'\\.jar$'
}
}
}
-}
\ No newline at end of file
+}