From e20b10e3f8bcf97f3b2eb66cc18cd8ef9edf310e Mon Sep 17 00:00:00 2001 From: breandan Date: Wed, 2 Dec 2015 09:58:03 -0500 Subject: [PATCH] Add deployment instructions for Gradle plugin --- tutorials/build_system.md | 2 +- tutorials/build_system/deployment.md | 41 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 tutorials/build_system/deployment.md diff --git a/tutorials/build_system.md b/tutorials/build_system.md index f2ea139e7..8dca611b5 100644 --- a/tutorials/build_system.md +++ b/tutorials/build_system.md @@ -7,4 +7,4 @@ When building a plugin on the IntelliJ Platform SDK, occasionally major version Additionally, it codifies a reproducible build process for compiling a plugin, running it inside your IDE, and finally publishing it on the plugin repo. The following tutorial refers to materials that can be found in the included [gradle_plugin_demo](https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/gradle_plugin_demo) project. Below are a series of guides to configure Gradle support. * [1. Getting Started](build_system/prerequisites.md) -* [1. Prerequisites](build_system/prerequisites.md) \ No newline at end of file +* [2. Deploying a plugin](build_system/deployment.md) \ No newline at end of file diff --git a/tutorials/build_system/deployment.md b/tutorials/build_system/deployment.md new file mode 100644 index 000000000..1bd672794 --- /dev/null +++ b/tutorials/build_system/deployment.md @@ -0,0 +1,41 @@ +--- +title: Deploying plugins with Gradle +--- + +Once you have configured Gradle support in your plugin, you can automatically build and deploy your plugin to the JetBrains [plugin repository](http://plugins.jetbrains.com). To do so at this time, you will need to have already published plugin page. + +### Add your account credentials + +In order to publish a plugin on the plugin repository, you will first need to supply your JetBrains account credentials to the plugin repository. These are typically stored in the [Gradle properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties). It is crucial that you do not check these credentials into source control. + +Place the following information in a file called `gradle.properties` under your project's root directory, or inside `GRADLE_HOME/gradle.properties`. + +``` +intellij.publish.username="YOUR_USERNAME_HERE" +intellij.publish.password="YOUR_PASSWORD_HERE" +``` + +### Add your plugin ID + +Inside the `intellij { ... }` portion of your Gradle buildscript, add the following snippet: + +```groovy +publish { + pluginId 'YOUR_PLUGIN_ID' + apply from: "gradle.properties" +} +``` + +Your pluginId can be found in your plugin's URL, ie. https://plugins.jetbrains.com/plugin/YOUR_PLUGIN_ID. + +### Deploy your plugin + +To deploy a new version of your plugin to the JetBrains plugin repository, execute the following Gradle command: + +```bash +gradle publishPlugin +``` + +Now check your plugin URL to verify the plugin has been updated. + +[Top](/tutorials/build_system.md) \ No newline at end of file