jvm-dependency-conflict-resolution icon indicating copy to clipboard operation
jvm-dependency-conflict-resolution copied to clipboard

Resolution does not seem to work with custom source sets

Open sschuberth opened this issue 5 months ago • 0 comments

I have

jvmDependencyConflicts {
    conflictResolution {
        select(CapabilityDefinition.JAVAX_ACTIVATION_API, "jakarta.activation:jakarta.activation-api")
    }
}

but still I get

> Could not resolve all files for configuration ':cli:funTestCompileClasspath'.
   > Could not resolve jakarta.activation:jakarta.activation-api:2.0.1.
     Required by:
         project :cli > com.icegreen:greenmail:2.0.1
      > Module 'jakarta.activation:jakarta.activation-api' has been rejected:
           Cannot select module with conflict on capability 'org.gradlex:jakarta-activation-api:2.0.1' also provided by [com.sun.activation:jakarta.activation:2.0.1(compile)]
   > Could not resolve com.sun.activation:jakarta.activation:2.0.1.
     Required by:
         project :cli > com.icegreen:greenmail:2.0.1 > com.sun.mail:jakarta.mail:2.0.1
      > Module 'com.sun.activation:jakarta.activation' has been rejected:
           Cannot select module with conflict on capability 'org.gradlex:jakarta-activation-api:2.0.1' also provided by [jakarta.activation:jakarta.activation-api:2.0.1(compile)]

when running ./gradlew funTestClasses on my custom funTest source set defined as

testing {
    suites {
        register<JvmTestSuite>("funTest") {
            sources {
                kotlin {
                    testType = TestSuiteType.FUNCTIONAL_TEST
                }
            }
        }
    }
}

sschuberth avatar Sep 24 '24 07:09 sschuberth