aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2025-01-20 20:05:58 +0000
committerDominik Stadler <centic@apache.org>2025-01-20 20:05:58 +0000
commit1dbcea46d513e2d3c999db0402de552804844ef6 (patch)
tree9e2fbb213fb9c51d7883f03e6776a9e44e4e8caf /poi-examples
parent045a37f9c116b15416a0d859e86775f0e2517378 (diff)
downloadpoi-1dbcea46d513e2d3c999db0402de552804844ef6.tar.gz
poi-1dbcea46d513e2d3c999db0402de552804844ef6.zip
Some changes to the Gradle build
Apply IDE suggestions for Gradle build files Remove obsolete sorting of gradle-wrapper.properties git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923284 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r--poi-examples/build.gradle6
-rw-r--r--poi-examples/src/main/groovy/build.gradle6
2 files changed, 6 insertions, 6 deletions
diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle
index ed6ae97c92..e965b9faa1 100644
--- a/poi-examples/build.gradle
+++ b/poi-examples/build.gradle
@@ -49,7 +49,7 @@ final String MODULE_NAME = 'org.apache.poi.examples'
final Pattern MODULE_REGEX = ~'\\.jar$'
final List MODULE_COMPILE_PATH = sourceSets.main.compileClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
-task compileJava9(type: JavaCompile) {
+tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
@@ -61,8 +61,8 @@ task compileJava9(type: JavaCompile) {
source = file(JAVA9_SRC)
classpath = files()
options.compilerArgs = [
- '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
- '--module-path', files(MODULE_COMPILE_PATH).asPath
+ '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
+ '--module-path', files(MODULE_COMPILE_PATH).asPath
]
}
diff --git a/poi-examples/src/main/groovy/build.gradle b/poi-examples/src/main/groovy/build.gradle
index 784d5c1378..496ab8cf8f 100644
--- a/poi-examples/src/main/groovy/build.gradle
+++ b/poi-examples/src/main/groovy/build.gradle
@@ -34,10 +34,10 @@ sourceSets {
}
// Run out read demo by default
-tasks.withType(JavaExec) {
- classpath = sourceSets.main.runtimeClasspath
+tasks.withType(JavaExec).configureEach {
+ classpath = sourceSets.main.runtimeClasspath
}
-task runScript(type: JavaExec) {
+tasks.register('runScript', JavaExec) {
mainClass = "SpreadSheetDemo"
args = ["../../../../test-data/spreadsheet/Simple.xls"]
}