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

Best practices on configure resources

$
0
0

at the moment we have one project configure with

sourceSets {
    resources {
         srcDir generatedResourcesDir
    }
}

taskB {
    doLast {
        copy { stuff into generatedResourcesDir }
    }
}

jar {
    dependsOn taskB
    from generatedResourcesDir
}

when we execute jar task, it would display warning “Encountered Duplicate… DuplicatesStrategy.WARN”

is it the right way to do it? I did try to remove the “from generatedResourcesDir”, but it from times to times it missing generatedResources from taskB, what’s the recommend approach for this?

Cheers,
Tony


Viewing all articles
Browse latest Browse all 19888

Trending Articles