Skip to content

Instantly share code, notes, and snippets.

@robhinds
Created April 4, 2020 09:21
Show Gist options
  • Save robhinds/ace26eb2de4c2c1f9c220ad11b39b73b to your computer and use it in GitHub Desktop.
Save robhinds/ace26eb2de4c2c1f9c220ad11b39b73b to your computer and use it in GitHub Desktop.
import com.amazonaws.auth.profile.ProfileCredentialsProvider
initscript {
dependencies {
classpath 'com.amazonaws:aws-java-sdk-core:1.11.5'
}
}
publishing {
repositories {
maven {
name "s3-repo"
ext {
awsCredentials = new ProfileCredentialsProvider("buildtool").credentials
}
url "s3://MY_BUCKET_NAME/maven-repo"
credentials(AwsCredentials) {
accessKey awsCredentials.AWSAccessKeyId
secretKey awsCredentials.AWSSecretKey
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment