diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-10-02 09:06:45 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-04 14:46:16 +0200 |
commit | 4bcef03a8de5abb3f93360215e1b21da33577beb (patch) | |
tree | b244f3e1e3f220c57a1b5f38d92c202c22f268fd /mkspecs/features | |
parent | ab90eefcc0714dfba032e7e4aa4c94cb8c6cc40c (diff) |
Android: Build against new build tools revisions
Whenever the SDK updates the build tools it's put inside a new
subdirectory with the version number, so with every new version
we would have to update the java.prf feature. Instead, we iterate
over the available revisions and pick the lexicographically highest
one (which is sufficient as long as the major version is
double digits.)
Change-Id: I2392ef6261ef36ed741c80fa6f981486e7844e0a
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/java.prf | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf index 265ab11fea..eeaafcc883 100644 --- a/mkspecs/features/java.prf +++ b/mkspecs/features/java.prf @@ -9,7 +9,13 @@ android { isEmpty(BUILD_TOOLS_REVISION) { BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION) - isEmpty(BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = 17.0.0 + isEmpty(BUILD_TOOLS_REVISION) { + BUILD_TOOLS_REVISIONS = $$files($$SDK_ROOT/build-tools/*) + for (REVISION, BUILD_TOOLS_REVISIONS) { + BASENAME = $$basename(REVISION) + greaterThan(BASENAME, $$BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = $$BASENAME + } + } } ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar |