We recently upgraded from Gradle 5.6.4 (AGP 3.6.0) to Gradle 7.0.2 (AGP 7.0.3). Immediately after upgrading, the third party license files now contain test dependencies marked as "testImplementation", which were not previously included. These should not be there because they aren't included into the APK and are only used for testing in our build pipeline.
Even when trying to upgrade to the latest Gradle version, 7.2, it still has the same issue.