In Unity Editor 2019, when you upgrade the Gradle version to 7.0+, the following errors could occur:
Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
> Failed to calculate the value of task
':unityLibrary:compileReleaseJavaWithJavac' property
'options.generatedSourceOutputDirectory'.
> Querying the mapped value of map(java.io.File
property(org.gradle.api.file.Directory,
property(org.gradle.api.file.Directory, fixed(class
org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory,
To resolve these errors, we recommend that you downgrade your Gradle version to 6.7 or 6.8.
For more information, see the Unity Mediation documentation.