{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/android-runtime/issues/93","repository_url":"https://api.github.com/repos/NativeScript/android-runtime","labels_url":"https://api.github.com/repos/NativeScript/android-runtime/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/android-runtime/issues/93/comments","events_url":"https://api.github.com/repos/NativeScript/android-runtime/issues/93/events","html_url":"https://github.com/NativeScript/android-runtime/issues/93","id":83787153,"number":93,"title":"Detect which Runtime?","user":{"login":"NathanaelA","id":850871,"avatar_url":"https://avatars.githubusercontent.com/u/850871?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanaelA","html_url":"https://github.com/NathanaelA","followers_url":"https://api.github.com/users/NathanaelA/followers","following_url":"https://api.github.com/users/NathanaelA/following{/other_user}","gists_url":"https://api.github.com/users/NathanaelA/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanaelA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanaelA/subscriptions","organizations_url":"https://api.github.com/users/NathanaelA/orgs","repos_url":"https://api.github.com/users/NathanaelA/repos","events_url":"https://api.github.com/users/NathanaelA/events{/privacy}","received_events_url":"https://api.github.com/users/NathanaelA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-06-02T01:54:08Z","updated_at":"2016-02-23T14:18:08Z","closed_at":null,"body":"Is their a command to get the current android runtime version, this would be very useful for add on.  I've got a add-on that is going to require a patch that hasn't been deployed yet.   This would be great if I could say \r\n```if (__versionRuntime <= \"1.02\") then doSomething()```\r\n"},"comment":{"url":"https://api.github.com/repos/NativeScript/android-runtime/issues/comments/187716117","html_url":"https://github.com/NativeScript/android-runtime/issues/93#issuecomment-187716117","issue_url":"https://api.github.com/repos/NativeScript/android-runtime/issues/93","id":187716117,"user":{"login":"NathanaelA","id":850871,"avatar_url":"https://avatars.githubusercontent.com/u/850871?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanaelA","html_url":"https://github.com/NathanaelA","followers_url":"https://api.github.com/users/NathanaelA/followers","following_url":"https://api.github.com/users/NathanaelA/following{/other_user}","gists_url":"https://api.github.com/users/NathanaelA/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanaelA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanaelA/subscriptions","organizations_url":"https://api.github.com/users/NathanaelA/orgs","repos_url":"https://api.github.com/users/NathanaelA/repos","events_url":"https://api.github.com/users/NathanaelA/events{/privacy}","received_events_url":"https://api.github.com/users/NathanaelA/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T14:18:08Z","updated_at":"2016-02-23T14:18:08Z","body":"@slavchev & @rosen-vladimirov  - SemVar is only part of the solution.   That does not fix the reason I want a __runtimeVersion.  :grinning:\r\n\r\nLets say I create AwesomePlugin (AP)  in v1.50 of TNS and I have versions 1.0.0, 1.0.1, 1.0.2 all minor bugs/feature enhancements.   I'm working on v2.0.0 as I have some really cool new feature that breaks how the plugin works.  Really close to when I'm about to release 2.0.0 myself, you release v2.0.0 because you create a new breaking changes. \r\nWell my v2.0.0 COULD support 1.5 fine, however to be compatible with v2.0.0 only a small change is required that is incompatible with v1.5.   My choices are:\r\n1. Abandon all my 1.5 clients\r\n2. Choose not to upgrade it to 2.0.0\r\n3. Create two separate packages with different patches\r\n4. Use __runtimeVersion to detect that this is 2.0.0 and have a simple \r\nif (ver < 2.0.0) { methodA(); } else { methodB(); }\r\n\r\nNow, which of those situations do you really think I want to be in as a plugin developer?   All four are valid options, but only one of them is a really great option.\r\n\r\n"}}