Gradle provided

Hi,
I need some help. I have a project A which uses some libs packeded in an EAR libs folder of project B.
With gradle 2.2 I used to use the provided configuration in order to add the Project B’s jars filed in the classpath of Project A.

configurations{
provided
}

dependencies{
provided project(’:ProjectB’)
}

Now,Now upgrading to gradle 7.2 I’dont know how to address this problem.

With gradle 7.2

configurations {
provided
compileOnly.extendsFrom(provided)
}

dependencies{
provided project(’:EarShared-ThirdPartiesLibs’)
}

Jar files seems to be not in the classpath of Project A at compile time.
Any suggestions?

Thank you.
Rob