[Android-tools-devel] android gradle plugins setup

Hans-Christoph Steiner hans at at.or.at
Thu Jul 21 19:44:14 UTC 2016


Markus Koschany:
> On 21.07.2016 13:18, Hans-Christoph Steiner wrote:
>>
>>
>> Markus Koschany:
>>> On 20.07.2016 09:54, Hans-Christoph Steiner wrote:
>>>>
>>>> I think we can do it using the same mechanism as gradle's "standard
>>>> plugins":
>>>> https://docs.gradle.org/current/userguide/standard_plugins.html
>>>>
>>>> Those are the plugins that come with the gradle binary zips.  I imagine
>>>> its just a standard path that we can customize with a patch or some
>>>> other way.
>>>
>>> Those plugins are installed to Debian's standard paths in
>>> /usr/share/java/ and /usr/share/maven-repo. (see libgradle-plugins-java)
>>> I don't think there is anything special involved. Projects need to use
>>> the apply command in build.gradle to activate them though.
>>>
>>> I suggest we install the Android Gradle Plugin also to
>>> /usr/share/maven-repo and then we could try to build a project the usual
>>> way by using the maven plugin and gradle-debian-helper can handle the rest.
>>
>> Yeah, the Debian setup should not force the loading of the plugins for
>> sure, e.g. the build.gradle must include:
>>
>>   apply plugin: 'com.android.application'
>>
>> What I'm thinking is that gradle will find the gradle android JAR
>> without having to add a repository like mavenLocal().  Sounds like we
>> just need to add the /usr/share/java and /usr/share/maven-repo paths for
>> android-platform-tools-base.  But do you think they should still go into
>> /usr/share/java?  I really can't see the Android gradle plugins ever
>> being used for any Java project.
> 
> I agree that there is probably no need to install the jars in
> android-platform-tools-base into /usr/share/java. If I understand
> seamlik's Gradle patch [1] correctly, we could try to symlink them into
> /usr/share/gradle/lib/plugins where Gradle should be able to find them.
> In addition we also install them to /usr/share/maven-repo.
> 
> [1]
> https://sources.debian.net/src/gradle/2.13-3/debian/patches/search_system_jar.diff/


Sounds like a good plan.

.hc



More information about the Android-tools-devel mailing list