I wrote the following in the root gradle.properties:
org.gradle.jvm.args="-Dhttps.protocols=TLSv1.2"
Pretty sure you can do that with a normal gradle option too.
pretend theres something useful for you