Gradle plugin which authenticates against AWS CodeArtifact using your local credentials to obtain the token.
In your build.gradle file:
plugins {
id 'ai.clarity.codeartifact' version '0.0.11'
}
repositories {
maven {
url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/'
}
}
publishing {
repositories {
maven {
url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/'
}
}
}
If you need a concrete profile for AWS authentication you have 4 different options:
repositories {
maven {
url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/?profile=prod'
}
}
Note: The query param is used to configure the profile and automatically removed from the url in any request to AWS.
This plugin uses AWS SDK for authorization, all the standard environment vars are applicable.
If you need a different profile for codeartifact than for the rest of AWS calls you can use this environment var.
If you need a different profile for codeartifact and you cannot define a enviroment variable, you can define it via system property also:
This way using gradle.properties
file:
systemProp.codeartifact.profile=<your profile>
Or using command line:
gradle -Dcodeartifact.profile=<your profile> ...