Tasks combined with buildType and flavors

I have defined few buildTypes and flavors:

buildTypes { debug release }
    flavors {
        one
        two
    }

Together with that I have a task which is finilized by build tasks:

task doSomethingWithExeFile { doLast{ binaries.all { println executableFile } } } build.finalizedBy doSomethingWithExeFile

It works perfectly with ‘gradle build’ command, but when I would like to call only one flavor: ‘gradle debugOne’ or ‘gradle releaseTwo’ my tasks is not handle by finilizedBy.

Is it something wrong with my approach?