AWS has the concept of partitions, which affects the region endpoints used to interacts with AWS. For example, there exists a GovCloud partition and possibly others, all of which change the S3 endpoint. See http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/using-govcloud-endpoints.html for the specific values. Unfortunately, Gradle assumes that there is single hardcoded endpoint in S3RegionalResource.java and even goes so far as to check for a fixed URL scheme.
private static final Pattern REGIONAL_ENDPOINT_PATTERN = Pattern.compile("^s3:\\/\\/(.+)?\\.s3[.-]([a-z0-9-]+)\\.amazonaws\\.com(\\.[a-z]+)?\\/(.+)");
It does not seem possible to change the region. Please add the ability to select the region.