diff options
author | Dominik Stadler <centic@apache.org> | 2025-01-20 20:05:58 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2025-01-20 20:05:58 +0000 |
commit | 1dbcea46d513e2d3c999db0402de552804844ef6 (patch) | |
tree | 9e2fbb213fb9c51d7883f03e6776a9e44e4e8caf /poi-ooxml-lite/build.gradle | |
parent | 045a37f9c116b15416a0d859e86775f0e2517378 (diff) | |
download | poi-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-ooxml-lite/build.gradle')
-rw-r--r-- | poi-ooxml-lite/build.gradle | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/poi-ooxml-lite/build.gradle b/poi-ooxml-lite/build.gradle index e9e046f2c5..47aff7b4fb 100644 --- a/poi-ooxml-lite/build.gradle +++ b/poi-ooxml-lite/build.gradle @@ -43,7 +43,7 @@ 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 = '../src/resources/ooxml-lite-report' -task generateModuleInfo() { +tasks.register('generateModuleInfo') { File fileIn = file("${OOXML_LITE_REPORT}.clazz") File fileOut = file("src/main/java9/module-info.java") @@ -55,8 +55,8 @@ task generateModuleInfo() { // generate module-info based on exported classes String exports = fileIn. - collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }. - findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n') + collect { " exports ${it.replaceAll('[/\\\\][^/\\\\]+$', '').replaceAll('[/\\\\]', '.')};" }. + findAll { !(it =~ /\.impl;$/) }.unique().sort().join('\n') String content = header + '\n' + exports + '\n}' if (fileOut.text != content) { @@ -65,7 +65,7 @@ task generateModuleInfo() { } } -task compileOoxmlLite(type: Copy) { +tasks.register('compileOoxmlLite', Copy) { dependsOn 'generateModuleInfo', ':poi-ooxml-full:generate_beans', ':poi-ooxml-full:compileJava' // This task is currently always executed, because gradle thinks files with two dollar signs @@ -100,8 +100,8 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') { classpath = files() doFirst { options.compilerArgs = [ - '--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}", - '--module-path', files(MAIN_MODULE_PATH).asPath + '--patch-module', "${MODULE_NAME}=${project(':poi-ooxml-full').sourceSets.main.output.asPath}", + '--module-path', files(MAIN_MODULE_PATH).asPath ] } } @@ -124,7 +124,7 @@ jar { } // ignore second module-info.class from poi-ooxml-full - // duplicatesStrategy = 'exclude' + // duplicatesStrategy = DuplicatesStrategy.EXCLUDE includeEmptyDirs = false manifest { |