According to Gradle documention (Example 50.27), we can use S3 backed Maven repositories with Gradle 2.4. However, the only example given in the docs passes explicit AWS credent
Untested, but I would try:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.amazonaws:aws-java-sdk:1.10.58'
}
}
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain
repositories {
maven {
url "s3://someS3Bucket/maven2"
credentials(AwsCredentials) {
def defaultCredentials = new DefaultAWSCredentialsProviderChain().getCredentials()
accessKey defaultCredentials.getAWSAccessKeyId()
secretKey defaultCredentials.getAWSSecretKey()
}
}
}