crosswalk-project/crosswalk-apk-generator — pull request #34 by townxelliot (2014-03-10 12:56:14+00:00)
Title: Infer android api version

This uses the platforms/ directory inside the Android SDK to infer the androidAPILevel if not set. For example, if a user has "android-18" and "android-19", API level is set to 19. It can still be manually set/overridden with the androidAPILevel property.

Once that's available, searches for the required pieces of the Android SDK now use globs, so that multiple candidates are returned. For example, if androidAPILevel is 19, the glob for aapt is "build-tools/19*/aapt"; if multiple files are returned, we choose the "latest" one. NB this copes with mixed environments where you might have "android-4.3" and "19.0.0" in the build-tools directory (depending on how the SDK was installed/updated): any "android-*" directory is converted into a "N.N.N" style directory. So "android-4.4" is treated as "19.0.0" for the purposes of sorting.

Because we have better version sorting, we can dispense with androidAPIVersion, and just pick up the latest tools for the API level instead (e.g. if the user has both "19.0.1" and "19.0.2" and androidAPILevel is 19, we use "19.0.2").

Fixes #26