Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Android plugin version included in IntelliJ IDEA?

... and how to find it out (in an authorative way)?

In Android Studio 0.8.11: when I check the same it shows 10.0.8.11. which corresponds to http://tools.android.com/recent and http://developer.android.com/sdk/installing/studio.html.

In IDEA EAP 14: when I go to Settings > Plugins > Android Support the version number shown is 10.0 which doesn't correspond to a recent version of IDEA/Android Studio/SDK/API. All of the above at v10 are too old to be the default bundle in a bleeding edge software.

I checked the .jar files' META-INF, but no luck. Some .jar names give a clue, here's what I was able to deduce:

╔════════════════════════════════╦═══════════════╦═══════════════╦════════════════╗
║                                ║ IntelliJ IDEA ║ IntelliJ IDEA ║ Android Studio ║
╠════════════════════════════════╬═══════════════╬═══════════════╬════════════════╣
║ Version                        ║ 13.1.5        ║ 14 EAP        ║ 0.8.11         ║
║ Build                          ║ IC-135.1289   ║ IC-138.2458.8 ║ AI-135.1446794 ║
║ Date                           ║ 2014-09-30    ║ 2014-09-25    ║ 2014-09-18     ║
║ builder-model.jar              ║ 0.12.0        ║ 0.12.0        ║ 0.13.0         ║
║ Android Support Plugin version ║ 10.0          ║ 10.0          ║ 10.0.8.11      ║
║ IntelliJ IDEA equivalent       ║ 13.1.5        ║ 14.x          ║ 13.1.5 RC**    ║
║ Android Studio equivalent      ║ 0.8.?*        ║ 0.8.?*        ║ 0.8.11         ║
╚════════════════════════════════╩═══════════════╩═══════════════╩════════════════╝

* based on release dates of Gradle plugin and Android Studio Beta
**We've merged in the latest changes from IntelliJ 13.1.5 RC

The versions doesn't look that far apart, I'm wondering what the 0.8.? version are exactly. I tried to swap plugins/android (and remove the duplicate EP: Designer.customizations) in the IDEA 14 folder, but it's sparkling with NoSuchMethodErrors after startup!

like image 709
TWiStErRob Avatar asked Oct 08 '14 16:10

TWiStErRob


2 Answers

It's complicated, and this will be a long answer. Unfortunately, we don't have a good short answer, because we don't do versioning of the plugin in a way that makes sense. This is something we should do.

To answer the question requires looking through JetBrains' commit logs for their different versions of IntelliJ. If I download the git repository for the Android plugin that ships with IntelliJ CE (see below for the longer answer with more details), I see this:

  • 13.1.5: roughly equivalent to Android Studio 0.8.6. Requires and supports v0.12 of the Android Gradle plugin.
  • 14: it tracks the most recent version of Android Studio, though it lags behind by maybe up to a week. The exact version will depend on when JetBrains did a source pull of the plugin from the Android team prior to cutting a given release. It requires v0.12 of the Android Gradle plugin and supports 0.13.

On to the long explanation:

The Android Build Tools team does 2-way code sharing with JetBrains. Android Studio is built on top of the 135 branch of the IntelliJ codebase (which explains the IC-135 you see in its build number), so Android Studio is derived from IJ 13.1.5, with some modifications and patches that haven't been upstreamed. We're not planning on moving to the 138 branch by the time we get to 1.0, so even at release it will still be 13-based, not 14-based.

On JetBrains' side, they mostly take upstream changes from Android for the plugin, but they also have folks working on the plugin on their side (and those changes get merged back down to the Android Studio end of things). At this point in 13's life cycle, they do releases of it slowly and are more conservative about what they pull into the Android plugin (in the interests of stability), so it's not completely up-to-date. They do releases for bug fixes in the main product and not to pick up the latest Android plugin.

In general it's probably not possible to upgrade just your Android plugin if you're running IJ 13. Changes to the plugin frequently require changes to the underlying platform; Android Studio will pick up those changes because its platform is releases along with its plugin, but IJ will need to wait until those changes are upstreamed. Having said that the rate of these changes is quite slow now, but it still happens.

For the 14 EAP release, they should be pulling changes from Android more rapidly, so that build should more closely reflect the current state of Android Studio, though again it depends on how often they do those pulls.

It should be noted that we don't coordinate releases or code pulls with JetBrains for the most part, so a given release of 14 EAP will reflect the current state of Android plugin at the time they did the code pull. As such, it may correspond to some state in between Android Studio releases.

To answer a question in the comments about why Android Studio and IntelliJ are separate products:

  • Android Studio is designed to provide a customized and streamlined experience for Android developers. It focuses on the Gradle build system (trying to use non-Gradle-based projects is discouraged), and a number of features and options that don't make sense for Android developers have been removed.
  • For users who want more flexibility, we encourage them to use IntelliJ CE.
  • IntelliJ Ultimate Edition, the paid version of the product, has additional features that are really powerful, and it's a great choice for those who need those features.
  • IntelliJ and the Android plugin were originally developed by IntelliJ, and neither of those are going away. The Android team is working with JetBrains to improve Android support in both products, and provides Android Studio as an optimized product for its particular audience.

If you want everything in one IDE, then your best bet is to probably run IntelliJ CE or Ultimate. It should have all the important functionality of Android Studio, though it may be rougher to use in spots. If you find things that don't work right in it but do work in Android Studio (especially related to Gradle project support), then we consider it a bug, so please file it.

like image 166
Scott Barta Avatar answered Oct 12 '22 08:10

Scott Barta


For newer Intellij versions (2020+): The build-in Android Gradle Plugin version is visible in Settings -> Plugins -> Android: 10.android-version.intellijbuild-version

Example:

  • Android version: 4.0
  • IDEA version: 203.5419.21

enter image description here

Source: https://youtrack.jetbrains.com/issue/IDEA-252823#focus=Comments-27-4444522.0-0

like image 30
mydefs Avatar answered Oct 12 '22 10:10

mydefs