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

  1. integrate the plugin in the buildfile

  2. get the required credentials from the Bintray website (or wherever you want to publish artifacts)

  3. add the required credentials:

    > gradle addCredentials --key bintrayUserName --value <your-Bintray-username>
    :addCredentials
    
    BUILD SUCCESSFUL
    
    > gradle addCredentials --key bintrayApiKey --value <some-long-key>
  4. 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