@@ -8,9 +8,9 @@ plugins {
8
8
}
9
9
10
10
dependencies {
11
- implementation ' org.slf4j:slf4j-api:1.7.36'
12
- implementation ' org.apache.arrow:arrow-format:13.0.0'
13
- implementation ' org.apache.arrow:arrow-vector:13.0.0'
11
+ api ' org.slf4j:slf4j-api:1.7.36'
12
+ api ' org.apache.arrow:arrow-format:13.0.0'
13
+ api ' org.apache.arrow:arrow-vector:13.0.0'
14
14
implementation ' org.apache.arrow:arrow-c-data:13.0.0'
15
15
runtimeOnly ' org.apache.arrow:arrow-memory-unsafe:13.0.0'
16
16
testImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
@@ -154,6 +154,39 @@ publishing {
154
154
url = ' https://github.com/datafusion-contrib/datafusion-java'
155
155
}
156
156
}
157
+ pom. withXml {
158
+ // Dependencies don't get mapped to the pom file due to using custom artifacts,
159
+ // so add them here
160
+ def dependenciesNode = asNode(). appendNode(' dependencies' )
161
+ def apiDependencies = configurations. api. allDependencies
162
+ Set<String > includedDependencies = []
163
+ apiDependencies. each {
164
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
165
+ dependencyNode. appendNode(' groupId' , it. getGroup())
166
+ dependencyNode. appendNode(' artifactId' , it. getName())
167
+ dependencyNode. appendNode(' version' , it. getVersion())
168
+ dependencyNode. appendNode(' scope' , ' compile' )
169
+ includedDependencies. add(String . format(" %s:%s" , it. getGroup(), it. getName()))
170
+ }
171
+ def implementationDependencies = configurations. implementation. allDependencies
172
+ implementationDependencies. each {
173
+ if (! includedDependencies. contains(String . format(" %s:%s" , it. getGroup(), it. getName()))) {
174
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
175
+ dependencyNode. appendNode(' groupId' , it. getGroup())
176
+ dependencyNode. appendNode(' artifactId' , it. getName())
177
+ dependencyNode. appendNode(' version' , it. getVersion())
178
+ dependencyNode. appendNode(' scope' , ' runtime' )
179
+ }
180
+ }
181
+ def runtimeDependencies = configurations. runtimeOnly. allDependencies
182
+ runtimeDependencies. each {
183
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
184
+ dependencyNode. appendNode(' groupId' , it. getGroup())
185
+ dependencyNode. appendNode(' artifactId' , it. getName())
186
+ dependencyNode. appendNode(' version' , it. getVersion())
187
+ dependencyNode. appendNode(' scope' , ' runtime' )
188
+ }
189
+ }
157
190
}
158
191
}
159
192
repositories {
0 commit comments