diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-07-19 21:59:38 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-07-19 21:59:38 +0000 |
commit | a18e04b3693dbc9e3aff40b653f4dc982a95919a (patch) | |
tree | b1c2b59e9e8c9ff92493e5e1edea877c15b22be0 /poi-ooxml-lite | |
parent | 4e28ad1935ce4e003c7fd184f42b272b503cec23 (diff) | |
download | poi-a18e04b3693dbc9e3aff40b653f4dc982a95919a.tar.gz poi-a18e04b3693dbc9e3aff40b653f4dc982a95919a.zip |
provide dist files via gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1891666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml-lite')
-rw-r--r-- | poi-ooxml-lite/build.gradle | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/poi-ooxml-lite/build.gradle b/poi-ooxml-lite/build.gradle index a5245419d6..96d58f3ec3 100644 --- a/poi-ooxml-lite/build.gradle +++ b/poi-ooxml-lite/build.gradle @@ -46,25 +46,14 @@ final Pattern MODULE_REGEX = ~'\\.jar$' final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique() final String OOXML_LITE_REPORT = '../build/ooxml-lite-report' - -task compileOoxmlLite(type: Copy) { +task generateModuleInfo() { dependsOn ':poi-ooxml:build', ':poi-integration:build', ':poi-excelant:build' File fileIn = file("${OOXML_LITE_REPORT}.clazz") File fileOut = file("src/main/java9/module-info.java") - outputs.upToDateWhen{ - ant.uptodate(property: "ooxmlLiteUnchanged", srcfile: fileIn.path, targetfile: fileOut.path) - ant.properties.ooxmlLiteUnchanged - } - - // copy re-/sources to modules own directory to pacify IntelliJ, which doesn't like the same source dir in multiple modules - from(project(':poi-ooxml-full').buildDir) { - include 'generated-sources/**' - include 'generated-resources/**' - include 'classes/java/main/**' - } - into(buildDir) + inputs.file fileIn + outputs.file fileOut doLast { String header = fileOut.collect().findAll { !(it =~ /exports|}/) }.join('\n') @@ -74,13 +63,28 @@ task compileOoxmlLite(type: Copy) { collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }. findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n') - String content = header + '\n' + exports + '\n}' + String content = header + '\n' + exports + '\n}\n' if (fileOut.text != content) { fileOut.write content } } } +task compileOoxmlLite(type: Copy) { + dependsOn 'generateModuleInfo' + + // This task is currently always executed, because gradle thinks files with two dollar signs + // (as in AlternateContentDocument$AlternateContent$Choice.class) are always stale + + // copy re-/sources to modules own directory to pacify IntelliJ, which doesn't like the same source dir in multiple modules + from(project(':poi-ooxml-full').buildDir) { + include 'generated-sources/**' + include 'generated-resources/**' + include 'classes/java/main/**' + } + into(buildDir) +} + java { sourceCompatibility = JavaVersion.VERSION_1_8 |