IntelliJ Plugin development of debugging, running, deployment, local installation and release of the project to the warehouse (3)

With the previous experience of creating the Hello World project, let's try how to debug, run, deploy, install locally, and publish the project to the warehouse.

1. Debugging and running:

Once the Demo project is written, how to run it? As we usually write Java and Android projects, just click Run or Run Debug on the IDEA menu bar.

But it should be noted that what we are writing now is a Plugin program, which is dependent on IDEA for survival. Therefore, when you click Run directly at this time, another IDEA test instance will be automatically opened, and the current plug-in project is already installed in this instance.

Try it out. In the running test instance, right-click anywhere on the project, and you will find that there is a Hello Action Menu menu item under the "Copy and Paste Menu Group", as shown in the figure:

Click the menu item, and the pop-up box as shown in the figure below will pop up, which is the Demo effect:

 

2. Deployment and installation:

I feel that the effect of this operation is a bit ugly, will it be better to install it in Android Studio? How to install it in Android Studio?

The deployment step is actually to compile and generate the plug-in installation package.

First go back to the IDEA instance of the Demo project, click Build -> Prepare Plugin Module "PluginDemo" For Development in the menu bar,

After a few seconds, the plug-in installation package of PluginDemo.jar will be generated in the root directory of the current Demo project.

Packing is complete.

 

Copy this jar package to the desktop, or where you can find it, then open Android Studio, open the settings interface, and select the Plugins option, as shown in the figure:

Click Install plugin from disk to install the plugin from the hard disk.

In addition, if your plug-in has been uploaded to the warehouse, you can click the button (Browse repositories) on the left side of the above picture to download the plug-in in the warehouse.

After installation, you need to restart Android Studio.

Then follow the previous operation, right-click the project, select the Hello Action Menu menu item, and trigger the Hello World pop-up box:

 

Three, upload all plug-in warehouses:

According to the previous operation, I confirm that you have already completed the plug-in package at this time. The next step is to find the plug-in warehouse address.

As mentioned earlier, the plug-in warehouse address is: https://plugins.jetbrains.com/idea

You also need to register the corresponding account and log in.

Then click the UPLOAD button to upload the prepared jar package and fill in other relevant instructions. Sorry that the icon cannot be given here. I cannot open the login page at this time. Is the wall too high?

The operation is not over yet, you have uploaded the plug-in, and you still need to go through the official review. As shown below:

If the DOWNLOAD button on the right is light blue and cannot be downloaded, it means that the current version of the plug-in has not been approved, and you can send an email to urge the official.

Say a little experience. A certain version I uploaded before has not been approved, and I used a certain article to reply to the email several times, but to no avail. So I changed it to Chinese, urged it again, and passed it the next day. Thumbs up?

After the review is passed, it can be downloaded in the plug-in market of IntelliJ IDEA and Android Studio.

 

 

 

 

Guess you like

Origin blog.csdn.net/fesdgasdgasdg/article/details/85939200