diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-09-01 22:32:48 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-09-01 22:32:48 +0000 |
commit | 5c6493a5fc76f2e11441d39af05e3f3208283896 (patch) | |
tree | a6e806672bf04201688e641e10a23ca9d712ef18 /poi-examples | |
parent | 7adf9c26b799f1323f77a5c80f463b5fe2a7f2a6 (diff) | |
download | poi-5c6493a5fc76f2e11441d39af05e3f3208283896.tar.gz poi-5c6493a5fc76f2e11441d39af05e3f3208283896.zip |
try to fix no-scratchpad build
remove or set-to-static scratchpad dependency from modules
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892795 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r-- | poi-examples/build.gradle | 19 | ||||
-rw-r--r-- | poi-examples/src/main/java9/module-info.java | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle index fe8feea87f..4aff0b8a6b 100644 --- a/poi-examples/build.gradle +++ b/poi-examples/build.gradle @@ -28,20 +28,29 @@ sourceSets { dependencies { api project(':poi-ooxml') - api project(':poi-scratchpad') +// api project(':poi-scratchpad') implementation project(path: ':poi-ooxml', configuration: 'archives') implementation project(path: ':poi-ooxml-full', configuration: 'archives') - implementation project(path: ':poi-scratchpad', configuration: 'archives') + + if (NO_SCRATCHPAD) { + compileOnly project(path: ':poi-scratchpad', configuration: 'archives') + } else { + implementation project(path: ':poi-scratchpad', configuration: 'archives') + } implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}" - testImplementation project(path: ':poi-ooxml', configuration: 'tests') + testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) { + if (NO_SCRATCHPAD) { + exclude group: 'org.apache.poi', module: 'poi-scratchpad' + } + } testImplementation project(path: ':poi', configuration: 'tests') } final String MODULE_NAME = 'org.apache.poi.examples' final Pattern MODULE_REGEX = ~'\\.jar$' -final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique() +final List MODULE_COMPILE_PATH = sourceSets.main.compileClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique() task compileJava9(type: JavaCompile) { dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' @@ -53,7 +62,7 @@ task compileJava9(type: JavaCompile) { classpath = files() options.compilerArgs = [ '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", - '--module-path', files(MAIN_MODULE_PATH).asPath + '--module-path', files(MODULE_COMPILE_PATH).asPath ] } diff --git a/poi-examples/src/main/java9/module-info.java b/poi-examples/src/main/java9/module-info.java index 68b580e3ee..db16935d94 100644 --- a/poi-examples/src/main/java9/module-info.java +++ b/poi-examples/src/main/java9/module-info.java @@ -18,7 +18,7 @@ module org.apache.poi.examples { requires transitive org.apache.poi.ooxml; - requires transitive org.apache.poi.scratchpad; + requires static org.apache.poi.scratchpad; requires java.xml; exports org.apache.poi.examples.crypt; |