Skip to content

Commit e3d2ca8

Browse files
author
emmanue1
committed
Update build file
1 parent 76dc769 commit e3d2ca8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ subprojects.each { subproject ->
5555
jar {
5656
dependsOn subprojects.tasks['jar']
5757

58+
// Add SPI directory
59+
def tmpSpiDir = file('build/tmp/spi')
60+
from tmpSpiDir
5861
// Add dependencies
5962
def deps = []
6063
subprojects.each { subproject ->
@@ -77,20 +80,17 @@ jar {
7780
exclude 'META-INF/licenses/**', 'META-INF/maven/**', 'META-INF/INDEX.LIST'
7881
duplicatesStrategy DuplicatesStrategy.EXCLUDE
7982
doFirst {
80-
// Add SPI directory
81-
def tmpSpiDir = file('build/tmp/spi')
83+
// Create SPI directory
8284
tmpSpiDir.deleteDir()
8385
def tmpSpiServicesDir = file(tmpSpiDir.path + '/META-INF/services')
8486
tmpSpiServicesDir.mkdirs()
85-
from tmpSpiDir
86-
8787
// Copy and merge SPI config files
8888
subprojects.each { subproject ->
8989
def servicesDir = file(subproject.sourceSets.main.output.resourcesDir.path + '/META-INF/services')
9090
if (servicesDir.exists()) {
91-
servicesDir.eachFile { source ->
92-
def target = file(tmpSpiServicesDir.path + '/' + source.name)
93-
target << source.text
91+
servicesDir.eachFile { serviceFile ->
92+
def target = file(tmpSpiServicesDir.path + '/' + serviceFile.name)
93+
target << serviceFile.text
9494
}
9595
}
9696
}

0 commit comments

Comments
 (0)