literalice / gradle-aws-s3-sync

The gradle task for synchronizing a local directory with a AWS S3 bucket.
37 stars 23 forks source link

AWS credentials is not loaded from a file synchronizer.properties #8

Closed romanman closed 9 years ago

romanman commented 9 years ago

AWS credentials is not loaded from a file synchronizer.properties

`accessKey "***"`
`secretKey "***"`
literalice commented 9 years ago

Thank you for the comment. With a properties file, you can only configure the items that are on the Jets3t's site( http://jets3t.s3.amazonaws.com/toolkit/configuration.html ). For AWS credentials or some other parameters, gradle's properties should be used. For example,

ext {
    aws = [accessKey: awsAccessKey, secretKey: awsSecretKey]
}

task deploy(type: S3Sync){
    accessKey aws.accessKey
    secretKey aws.secretKey
    // ...
}

And now you can set the properties via gradle.properties or -P command line options.

I have renamed synchronizer.properties( http://jets3t.s3.amazonaws.com/applications/synchronize.html ) to jets3t.properties on my samples and documents. Thanks.