SBT plugin for Google Cloud Storage (GCS) and Google Artifact Registry
- Support for raw Google Cloud Storage buckets (
- Support Google Artifact Registry (
- Simple to use
- Coursier support (sbt 1.3+)
- Ability to configure Google Credentials using sbt settings
SBT versions support
sbt v1.4+ (I haven't tested this with previous versions)
Install the plugin
Add this to your
addSbtPlugin("org.latestbit" % "sbt-gcs-plugin" % "1.7.4")
publishTo := Some("My GCS artifacts" at "gs://<your-bucket-name>")
resolvers += "My GCS artifacts" at "gs://<your-bucket-name>"
Google Artifact Registry publishing
publishTo := Some("My private artifacts" at "artifactregistry://<your-artifact-registry-url>")
Google Artifact Registry resolving
resolvers += "My private artifacts" at "artifactregistry://<your-artifact-registry-url>"
Google Cloud credentials file configuration
Plugin tries to load Google Account in the following order:
- Specified settings in sbt build
googleCredentialsFile := Some(new File("<your-account-file>"))
Default application credentials (gcloud settings) or environment variable:
If you see some errors such as
The Application Default Credentials are not available.
when you start sbt, that means there is no default credentials configured on your machine.
You can use
gcloud auth application-default login to fix it or specify path to your account file
using environment variable
Follow for details https://developers.google.com/accounts/docs/application-default-credentials.
Configure publish access level (GCS only):
gcsPublishFilePolicy := GcsPublishFilePolicy.InheritedFromBucket // Default // If you really need to make some of the files available for everyone gcsPublishFilePolicy := GcsPublishFilePolicy.PublicAccess
For Google Artifact Registry please use gcloud/GCP console to manage security.
Apache Software License (ASL)