How to lower the priority of jar files in project dependencies in build.gradle.

Gradle Version: 6.7.1

I’m trying to resolve a dependency with gradle in my project. But I am facing a problem.

The foo project depends on the bar project as shown below.

dependencies {
    implementation project(':bar')



There is a jar file in this bar project. the names of src/ and contained in the jar file are duplicated. When I try to build the whole project, the foo project references in the jar file.

I want to refer to src/ Not in the jar file Is there any solution to this problem?