[Android-tools-devel] automating build-tools version

Hans-Christoph Steiner hans at at.or.at
Tue Oct 11 14:47:35 UTC 2016



殷啟聰:
> Hi Hans,
> 
> Sorry to pick up this topic after so many days.
> 
> I think this is doable. We can install all Build-tools binaries into
> /usr/lib/android-sdk/build-tool/debian, and provide the symlink to it
> in `android-sdk-build-tools`. Thus we only need to track the
> BUILD_TOOLS_VERSION in src:android-sdk-meta and keep all packages
> consistent.

That sounds workable.

> But as the result, all programs of Build-tools can't rely on
> BUILD_TOOLS_VERSION, but I guess no program relies on that. So far I
> can only think of the Gradle plugin who reads the BUILD_TOOLS_VERSION
> from the installation path, but I don't see a point if one uses the
> Gradle plugin with only a subset of Build-tools installed.
> 
> And I don't think libgradle-android-plugin-java, a Java library
> package, should depends on anything other than other Java libraries.
> But we can put `android-sdk-build-tools` into the Suggests section.

I think it should be Recommends:.  The gradle android plugin is pretty
much useless without build-tools.  And there are ways of making gradle
only use the installed version of the build-tools.

.hc

> Cheers,
> Kai-Chung Yan
> 
> 2016-02-08 17:50 GMT+08:00 Hans-Christoph Steiner <hans at at.or.at>:
>>
>> I was just looking at android-platform-frameworks-base, and saw this bit
>> in debian/rules:
>>
>> # See sdk/build_tools_source.prop_template in platform/development
>> export BUILD_TOOLS_VERSION = 23.0.1
>>
>> This should be automated to prevent bugs.  I think we can do it
>> something like how upstream does it: including a source.properties file.
>>  For example:
>>
>> /usr/lib/android-sdk/platform-tools/source.properties
>> /usr/lib/android-sdk/build-tools/23.0.2/source.properties
>>
>> Then any package that is building pieces of build-tools should then read
>> that file to get the right version.  For that to work reliably, we might
>> need a standard symlink, like:
>>
>> /usr/lib/android-sdk/build-tools/current/source.properties
>>
>>   or
>>
>> /usr/lib/android-sdk/build-tools/debian/source.properties
>>
>> .hc
>>
>> _______________________________________________
>> Android-tools-devel mailing list
>> Android-tools-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
> 
> 
> 



More information about the Android-tools-devel mailing list