gradle - Copy files over before jarring -
i can't script wait until libraries copied on 'src/main/resources/libs' before starts jar everything. files copied on jar task think not waiting until files copied over? because not added jar. unless run script again :/ how fix this?
task copydependencies(type: copy) { configurations.mylib 'src/main/resources/libs' } jar.dependson 'copydependencies' jar { manifest {} }
to execution order right, processresources have depend on copydependencies. however, shouldn't copy src/main/resources. instead, libraries should included directly in jar, without intermediate steps:
jar { into("libs") { configurations.mylib } } this assumes there custom process or class loader in place makes use of libraries in jar's libs directory. standard jvm/class loader ignore them.
Comments
Post a Comment