> gradle addCredentials --key bintrayUserName --value <your-Bintray-username>
:addCredentials
BUILD SUCCESSFUL
> gradle addCredentials --key bintrayApiKey --value <some-long-key>
Publishing kbd:htmlSC Releases
Automating the Upload of a Gradle Plugin
Puh - handling Bintray or JCenter is not funny.
Handling (Secret) Credentials
We use Etienne Studers awesome Gradle-Credentials plugin to allow automatic deployment to public portals (like Bintray, JCenter and/or Gradle-Plugin-Portal) and keep the appropriate passwords/API-keys secret.
Brief instructions below - for details see the credentials plugin
-
integrate the plugin in the buildfile
-
get the required credentials from the Bintray website (or wherever you want to publish artifacts)
-
add the required credentials:
-
Within the buildfile you can now access these credentials as follows:
// include these lines in your build.gradle: println "Username : " + credentials.bintrayUserName println "Bintray API Key : " + credentials.bintrayApiKey
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.