From d65716ae0d60b61a125c25928f6990a1a02af931 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 19 Jan 2024 19:14:52 +0100 Subject: [PATCH 1/2] wip --- build.gradle | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fc90a24..2ebcb71 100644 --- a/build.gradle +++ b/build.gradle @@ -24,11 +24,15 @@ repositories { mavenCentral() } +ext { + poiVersion = '5.2.5' +} + dependencies { implementation 'org.slf4j:slf4j-api:2.0.11' implementation 'com.h2database:h2:2.2.224' - implementation 'org.apache.poi:poi-ooxml:5.2.5' - implementation 'org.apache.poi:poi:5.2.5' + implementation "org.apache.poi:poi-ooxml:$poiVersion" + implementation "org.apache.poi:poi:$poiVersion" implementation 'org.apache.xmlbeans:xmlbeans:5.2.0' implementation 'org.apache.commons:commons-text:1.11.0' testImplementation 'junit:junit:4.13.2' @@ -43,6 +47,13 @@ java { withSourcesJar() } +javadoc { + options { + links 'https://docs.oracle.com/javase/8/docs/api/' + links "https://javadoc.io/doc/org.apache.poi/poi/$poiVersion/" + } +} + tasks.named('jar') { manifest { attributes('Automatic-Module-Name': 'com.github.pjfanning.poisharedstrings') From 7c6c5dee30b70f14886f0e59818b21fc75eb8934 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 19 Jan 2024 19:37:52 +0100 Subject: [PATCH 2/2] use plugin --- build.gradle | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 2ebcb71..ce4141d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ plugins { id 'io.github.gradle-nexus.publish-plugin' version "1.3.0" id 'org.cyclonedx.bom' version "1.8.1" id 'org.sonarqube' version "4.0.0.2929" + id 'io.github.sgtsilvio.gradle.javadoc-links' version "0.8.0" } group = 'com.github.pjfanning' @@ -47,13 +48,6 @@ java { withSourcesJar() } -javadoc { - options { - links 'https://docs.oracle.com/javase/8/docs/api/' - links "https://javadoc.io/doc/org.apache.poi/poi/$poiVersion/" - } -} - tasks.named('jar') { manifest { attributes('Automatic-Module-Name': 'com.github.pjfanning.poisharedstrings')