Dependency between projects not working

My case is: Having a custom configuration - myArchives, and project A is depending on the archives of project B, but when uploading archives the order is A, B. So seem like the dependencies section is not resolve the order correctly. The right order should be B, A

build.gradle under A project

configurations {
    myArchives{
        transitive = false
    }
}
  dependencies {
    myArtifact(
            project(path:':B', configuration:'archives')
    )
}

Assuming ‘myArtifact’ should be ‘myArchives’ in the code above, and that project A has the ‘java’ plugin applied, you’ll get an ‘:a:uploadArchives’ and an ‘:a:uploadMyArchives’ task. Anyhow, the order in which A’s and B’s upload tasks are executed shouldn’t matter, as these are independent operations.