What is the Android plugin version included in IntelliJ IDEA?

后端 未结 3 1916
醉梦人生
醉梦人生 2021-02-06 07:32

... 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://tool

相关标签:
3条回答
  • 2021-02-06 07:51

    I think I found a more specific answer, not perfect; it's really complicated as Scott said. I found that the android plugin is referenced from an external repository which is not on github in the getPlugins script:

    git clone git://git.jetbrains.org/idea/android.git android

    Find the git revision log for IntelliJ

    1. Go to Help > About in IntelliJ IDEA (or build.txt in install folder)
    2. Check the version number (current latest is IC-139.222.5)
    3. http://git.jetbrains.org/?p=idea/android.git;a=shortlog;h=refs/tags/idea/139.222.5
    4. Find the last merge: Merge branch 'studio-1.0-release' of .../platform/tools/adt/idea

    Unfortunately I didn't find any clear pointer to revision range in the Google Android Studio repo, but you can try matching by dates.

    For 13.1.5 on the IntelliJ IDEA website > Downloads: Build: 135.1289

    Fallback

    To give a rough estimation one can check in

    IntelliJ IDEA\plugins\android\lib\android.jar\META-INF\plugin.xml

    Where it's clear what is the minimum version is: <version>10.0.8.12</version>, since any commits after that may be merged until this line changes to the next version.

    0 讨论(0)
  • 2021-02-06 08:09

    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

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

    0 讨论(0)
  • 2021-02-06 08:11

    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.

    0 讨论(0)
提交回复
热议问题