Precautions for android studio plugin


Hi i want to enable users to use my intellij (version 14.1) plugin in android studio also. Are there any precautions that I should take or everything that works on Intellij will also work on AS wothout any deviations?
For example I am able to add library dependency like here https://devnet.jetbrains.com/message/5310983#5310983

It works fine on intellij, but on studio, the dependency is lost when the project is re opened.

3 comments
Comment actions Permalink

Hello preetam, I suppose here you can find related information: http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
There are lists of modules available for platform/specific IDE.
The article also describes a way to check if a plugin is compatible with an IDE.

0
Comment actions Permalink

Hi, thanks for the reply. It really helped. I want to ask another question about the build system(gradle, maven etc.). While adding dependency in Intellij, as in the link above, the iml file for the corresponding module is being updated. But in Android Studio, the build.gradle file is updated. How to achieve compatibility through all the build systems? ie If its a gradle system, add to build.gradle, if a maven system add to pom.xml automagically. thanks again :)

0
Comment actions Permalink

Hi, there was no common aproach for dealing with such kind of tasks before IDEA v15.
It seems, there are some kind of customizations/replacement of built-in IDEA's quickfixes were introduced in Android Studio and it can be the reason why it may not work in IDEA (with android plugin installed)

Thast's why, since IDEA 15, a new API was introduced to perform modifications of a project configuration accordingly with dependency management system used in the project.
Please, see details at https://github.com/JetBrains/intellij-community/blob/master/java/java-impl/src/com/intellij/openapi/roots/JavaProjectModelModificationService.java

Currently, (in IDEA 15 eap builds) there's support for IDEA and Maven build systems.
The support for gradle build system is not available yet but planned, we are looking forward to reuse the gradle scripts parser which is used in Android Studio.

0

Please sign in to leave a comment.