Running Gradle 7.0.1
We where running in a Docker container, with OpenJDK
Gradle was then fully able to detect that it had Java11 ToolChain available, and did not try to download it from AdoptOpenJDK.
+ AdoptOpenJDK 11.0.11 | Location: /usr/java/jdk-11.0.11+9 | Language Version: 11 | Vendor: AdoptOpenJDK | Is JDK: true | Detected by: Current JVM
Then I created a new Docker image, with the latest OpenJDK 11.0.12, which is the new Temurin OpenJDK
Eclipse Foundation 11.0.12+7.
Now gradle tries to download Java ToolChain, even though Gradle is running on the same required OpenJDK.
root project > Resolve dependencies of :compileClasspath > Provisioning toolchain adoptopenjdk-11-x64-linux.tar.gz > adoptopenjdk-11-x64-linux.tar.gz
This happens on both latest Java 11, and Java 16
I guess it is because AdoptOpenJDK has changed to Eclipse Temurin.