clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

restore support for previous sdk versions #33

Closed sergv closed 11 years ago

sergv commented 11 years ago

After commits https://github.com/clojure-android/lein-droid/commit/448ea332bc009c8ac81d47e9939e252592a11056 and https://github.com/clojure-android/lein-droid/commit/96a8fd82a2cd00bd36a1d83c341074bad5425b89 lein-droid does not seem to support SDK versions without build-tools so anyone who, like me, haven't upgraded yet will be affected. Therefore I propose this modification that restores previous behavior when build-tools directory does not exist and tries to warn user about possible cause of missing tool error.

alexander-yakushev commented 11 years ago

It makes sense to warn a user intelligently if Build Tools are not installed. Allbeit I think that to support all possible versions of SDK is a dive into the rabbit hole. Can you please give an example when it is necessary to keep the older version of SDK? If there are such, then it is worth providing the support for older versions. Otherwise it is better to drop out with a message to upgrade the SDK.

sergv commented 11 years ago

I came up with following cases that justify supporting of old SDK versions: user might have slow Internet connection at this particular instant (e.g. temporary problems with Internet provider) which may cause significant delay. Or user may be constrained by some sort of a policy, e.g. "everyone in a team should use SDK version X". And rather rare, but still real case of user with his customized version of SDK based on revision prior to 22 that is not going to be upgraded in foreseeable future. Or user is dependent on features of old SDK, like presence of apkbuilder, so upgrade may break his workflow and, therefore, is not going to happen soon.

I agree that supporting every previous version is a bad idea and recognize provided use cases as marginal but still this backward compatibility issue might cause unnecessary delays. As a compromise I propose to support at least one previous version of SDK which will leave users some time to upgrade.

alexander-yakushev commented 11 years ago

Seems fair. I've pushed your commit with the fix, only changing the second chunk where binary existence is checked. Thank you!