From a826e8e32d58fbdb6af18116136cff3d3df76bc0 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 26 Oct 2021 00:37:27 +0000 Subject: [PATCH] try to add LICENSE and NOTICE to sources jars git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894566 13f79535-47bb-0310-9956-ffa450edef68 --- poi-ooxml-lite/build.gradle | 3 +-- poi-scratchpad/build.gradle | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/poi-ooxml-lite/build.gradle b/poi-ooxml-lite/build.gradle index 6b10453af9..6138200762 100644 --- a/poi-ooxml-lite/build.gradle +++ b/poi-ooxml-lite/build.gradle @@ -129,8 +129,7 @@ jar { File missingXsbsFile = file("missing-xsbs.txt") List xsbs2 = missingXsbsFile.findAll { !it.empty && !it.startsWith("#") } .collect { "org/apache/poi/schemas/ooxml/system/ooxml/${it.trim()}.xsb" } - includes = clazz + clazzInner + xsbs + xsbs2 + - ['META-INF/versions/**', 'META-INF/LICENSE', 'META-INF/NOTICE', 'org/apache/poi/schemas/ooxml/element/**'] + includes = clazz + clazzInner + xsbs + xsbs2 + ['META-INF/versions/**', 'org/apache/poi/schemas/ooxml/element/**'] } } diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle index 6b7781df5b..3927b62c8a 100644 --- a/poi-scratchpad/build.gradle +++ b/poi-scratchpad/build.gradle @@ -114,6 +114,13 @@ jar { } } +sourcesJar { + metaInf { + from("$projectDir/../legal/LICENSE") + from("$projectDir/../legal/NOTICE") + } +} + // Create a separate jar for test-code to depend on it in other projects // See http://stackoverflow.com/questions/5144325/gradle-test-dependency task testJar(type: Jar, dependsOn: testClasses) {