-
Notifications
You must be signed in to change notification settings - Fork 4
/
poi.gradle
33 lines (30 loc) · 990 Bytes
/
poi.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Create a merged apache POI bundle.
*/
def poi(poiVersion = '5.2.3', poiOoxmlSchema = '4.1.2') {
platform {
feature id: 'platform.shared.poi',
name: 'Apache POI',
version: poiVersion, {
// merged POI bundle
merge(failOnDuplicate: false) {
bundle "org.apache.poi:poi:$poiVersion"
bundle "org.apache.poi:poi-ooxml:$poiVersion"
// using ooxml-schema give java.lang.NoSuchFieldError: Factory, https://stackoverflow.com/a/71545805
//bundle "org.apache.poi:poi-ooxml-schemas:$poiOoxmlSchema"
bundle "org.apache.poi:poi-ooxml-lite:$poiVersion"
bnd {
symbolicName = 'org.apache.poi'
bundleName = 'Apache POI'
version = poiVersion
// only provide poi packages as exported packages
instruction 'Export-Package', "org.apache.poi.*;version=$version"
instruction 'Private-Package', '*'
// don't import any poi packages
prependImport '!org.apache.poi.*', 'org.apache.xmlbeans.impl.schema'
}
}
}
}
}
poi()