Gradle - How to concatenate multiple files with same name and path when building jar?

547
January 15, 2017, at 8:51 PM

I'm trying to build a jar from my build.gradle file with the following jar task, trying to include all dependencies:

jar {
zip64 true
doFirst {
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}

Basically I suspect I need to concatenate the content from a file in the root of this resulting jar called references.conf. As it seems this file comes from other different dependencies and jars I'm not sure if it's being overwritted or simply ignored. How could I tell gradle in this task to as a duplicate strategy for this specific file to solved as a concatenation of contents from the files that match such name and path?

Rent Charter Buses Company
READ ALSO
Localizing Jfree chart pop up menu and other menu items

Localizing Jfree chart pop up menu and other menu items

I am using jfree chart library 10

359
Why I can not change the Image in Dynamic-created ImageButton

Why I can not change the Image in Dynamic-created ImageButton

this part goes wrong------------->if(studentseat[CurrentButtonNumber]=="1")

373
after converting txt(mixed numbers and characters) to SQL - defining between numbers and words

after converting txt(mixed numbers and characters) to SQL - defining between numbers and words

i want to create DB from the content of Subtitles filesThe result from importing srt file (converted to txt) is a long column of numbers, seconds - depicted by numbers - and the subtitle itself all mixed together

312
How do I include maven environment variables in eclipse to war file

How do I include maven environment variables in eclipse to war file

I have environment variables in my applicationproperties like this spring

433