-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
150 lines (119 loc) · 3.46 KB
/
build.gradle
File metadata and controls
150 lines (119 loc) · 3.46 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'com.gradleup.shadow' version '8.3.6' apply false
id 'org.graalvm.buildtools.native' version '0.10.6' apply false
}
allprojects {
group = 'com.github.abc-inc'
version = '0.1.0'
}
subprojects {
apply plugin: 'java'
sourceCompatibility = '21'
repositories {
maven { url 'https://artifacts.rbi.tech/artifactory/public' }
mavenCentral()
}
}
project(':docx-cli') {
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.gradleup.shadow'
apply plugin: 'org.graalvm.buildtools.native'
mainClassName = 'com.github.abcinc.docx.Docx'
dependencies {
implementation project(':docx-docx4j')
implementation project(':docx-poi')
implementation 'ch.qos.logback:logback-classic:1.5.18'
implementation 'commons-io:commons-io:2.19.0'
implementation 'info.picocli:picocli:4.7.7'
implementation 'org.slf4j:slf4j-api:2.0.17'
annotationProcessor 'info.picocli:picocli-codegen:4.7.7'
}
compileJava {
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
graalvmNative {
testSupport = false
binaries {
main {
imageName = 'docx'
quickBuild = false
richOutput = true
buildArgs.add('-H:+AddAllCharsets')
}
configureEach {
resources.autodetect()
}
}
agent {
enabled = true
// builtinCallerFilter = true
// builtinHeuristicFilter = true
// trackReflectionMetadata = true
metadataCopy {
inputTaskNames.add('run')
outputDirectories.add('src/main/resources/META-INF/native-image')
mergeWithExisting = true
}
}
}
publishing {
repositories {
maven {
name = 'GitHubPackages'
url = 'https://maven.pkg.github.com/abc-inc/docx'
credentials {
username = System.getenv('ARTIFACT_REPOSITORY_USERNAME')
password = System.getenv('ARTIFACT_REPOSITORY_PASSWORD')
}
}
}
publications {
gpr(MavenPublication) {
artifact shadowJar
pom {
name = 'docx'
description = 'A command-line tool for processing Microsoft Word documents in the DOCX format.'
url = 'https://github.com/abc-inc/docx'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
}
}
project(':docx-core') {
apply plugin: 'java-library'
dependencies {
api 'com.google.guava:guava:33.4.8-jre'
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}
}
project(':docx-docx4j') {
apply plugin: 'java-library'
dependencies {
api project(':docx-core')
implementation 'org.docx4j:docx4j-export-fo:11.5.2'
implementation 'org.docx4j:docx4j-JAXB-ReferenceImpl:11.5.2'
// implementation 'org.docx4j:docx4j-JAXB-MOXy:11.5.2' // alternative JAXB
// runtimeOnly 'xerces:xercesImpl:2.12.2' // for docx4j-core (XmlUtils)
}
}
project(':docx-poi') {
apply plugin: 'java-library'
dependencies {
api project(':docx-core')
implementation 'fr.opensagres.xdocreport:fr.opensagres.poi.xwpf.converter.pdf:2.1.0'
implementation 'fr.opensagres.xdocreport:fr.opensagres.xdocreport.document.docx:2.1.0'
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.25.0'
}
}