Gradle 8: Custom config of libs/jars are not merged into classes.jar

Problem Statement:

In Gradle 7, I used only the following command to add .jar dependencies from a custom configuration, and they were merged into classes.jar and obfuscated during release builds and libs folder got removed

implementation(customConfig.asFileTree)

However, in Gradle 8, the same logic no longer merges the class files into classes.jar. The ProGuard/R8 output is empty, and all jars remain in the libs/ folder without obfuscation. I have tried many things, but nothing works. Try to understand what the change is in Gradle 8 that libs classes are not copied to classes.jar

Setup:

I have two custom configurations:

val customConfig by configurations.creating

You probably have to provide a more complete MCVE.
Besides that your question does more sound like seeking help with some Gradle plugin than with Gradle itself.
Gradle does not know about classes.jar specifically or ProGuard or R8.