Jako
Jako

Reputation: 2577

How to add more files to be copied by Sync task, but only for one project

I have a multi project build with one root project and many sub-projects.

In the root configuration I have many task in common for all sub-projects. I would like to extend one of them, only for a specific subproject

task distrib_bin(type: Sync) {
        into "$buildDir/custom-distrib"
        from '../bin-dist'
 }

For that project (for example project 'broker') I need to add some files to the previous Sync task. I tried with project.ext properties but I think I'm very far from the solution. Thanks for all your help

Upvotes: 0

Views: 401

Answers (1)

erdi
erdi

Reputation: 6954

In your subproject build file simply say:

distrib_bin {
    from ... //whatever files you need to add here
}

It will allow you add more configuration to the task.

Upvotes: 1

Related Questions