aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples/build.gradle
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-09-01 22:32:48 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-09-01 22:32:48 +0000
commit5c6493a5fc76f2e11441d39af05e3f3208283896 (patch)
treea6e806672bf04201688e641e10a23ca9d712ef18 /poi-examples/build.gradle
parent7adf9c26b799f1323f77a5c80f463b5fe2a7f2a6 (diff)
downloadpoi-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/build.gradle')
-rw-r--r--poi-examples/build.gradle19
1 files changed, 14 insertions, 5 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
]
}