Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19859

How to take all the dependencies of a particular configuration from all projects in a multi-project build

$
0
0

Not sure how pretty this is, but maybe something like this?

// Root project

dependencies {
    subprojects {
        client project(path: it.path, configuration: "client")
    }
}

task copyClientDeps(type: Copy) {
    from configurations.client
    into "$buildDir/release/client-libs"
}

It might be better to model the dependencies as variants though. But in either case, you will need to declare dependencies on your client libraries in order to have the dependency resolution rules take effect.

Another thing you might want to look into is using the same versions of your client dependencies inside each client project. Otherwise you are building and testing against one version, but possibly releasing against another.


Viewing all articles
Browse latest Browse all 19859

Trending Articles