0

I tried to migrate from local jar dependencies to repository-oriented. Now it looks like:

api(files("thirdparty/j-interop-2.0.4.jar"))

The desired result is:

api("org.jinterop", "j-interop", "2.0.4")

The problem is final jar should contain unpacked dependency of j-interop called j-interopdeps with excluded org.bouncycastle subtree. Because there is already another bouncycastle dependency.

So not it looks:

tasks.create<Jar>("proj-libs") {
    archiveFileName.set("proj-libs.jar")
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE

    from(zipTree("thirdparty/j-interopdeps-2.0.4.jar")) {
        exclude("org/bouncycastle/**")
    }
    destinationDirectory.set(File("jar"))
    finalizedBy("final-libs")
}

The question is how to do the same but with dependency downloaded from Maven repository?

devaskim
  • 492
  • 3
  • 10

0 Answers0