[Android-tools-devel] Android Gradle Plugin

Hans-Christoph Steiner hans at at.or.at
Mon Feb 8 13:32:38 UTC 2016



Markus Koschany:
> Hi all,
> 
> I am currently in the process of packaging the Android Gradle Plugin
> plus related tools and the apktool package. Here is a short overview
> about the progress.
> 
> I work with the following upstream repository:
> 
> https://android.googlesource.com/platform/tools/base
> 
> In addition I also use upstream's Gradle build system. The build files
> are located under tools which is not a git repository. I had to clone
> the complete Android sources with their repo tool. If someone knows a
> better way to obtain build.gradle and settings.gradle for this project,
> please let me know.

Great to see progress!  Which git repo do those files end up in after
you check out with repo?  There might need to be some kind of
'android-sdk-gradle-helper' package that just puts the build.gradle into
/usr/share/... for the other packages to find.


> I would like to call the resulting source package
> 
> 	android-tools-base

We've been using the full git repo names as the naming convention for
source packages, so this one should be:

  android-platform-tools-base

after the git repo:

  https://android.googlesource.com/platform/tools/base/


> Android Gradle Plugin:
> ======================
> 
> I have successfully built the whole tools/base repository including the
> gradle plugin. In total 33 jar files are built. However there is still
> one important issue left: lombok-ast. I currently have to use upstream's
> version.
> 
> At the end of this e-mail you can find a list of all resulting jar
> files. I'm not 100% sure yet in how many binary packages they should be
> divided. Suggestions are welcome. [1]
> 
> 
> The following new build dependencies had to be packaged:
> 
> * intellij-annotations
>   https://anonscm.debian.org/cgit/pkg-java/intellij-annotations.git
> 
> * android-tools-common
>   http://mvnrepository.com/artifact/com.android.tools/common/24.2.3
> 
> * android-tools-annotations
>   http://mvnrepository.com/artifact/com.android.tools/annotations/24.2.3

These probably should be built as part of another source package.  Do
you know which git repo those are built from?  Or maybe we need to
rethink the source package approach for the Java stuff if there is a
reliable place to get the sources.  With the C/C++ stuff, there is no
upstream source package besides the git.


> I'm not sure if the new Android maven artifacts are also part of our
> current src:androidsdk-tools package. At least we don't ship any maven
> artifacts with this package, so we would need to update it anyway. For
> the sake of progress I packaged both artifacts from Maven Central and
> that works for me.

Fully supporting maven would be good here, but it is optional for now.
It is something we can come back later to, like as part of the GSoC work
this summer.  Also, our goal is to fully replace the androidsdk-tools
source package with common approach across the whole Android SDK.



> * I updated src:proguard which now ships the proguard-gradle and
>   proguard-base maven artifacts.
> 
> * I fixed src:trove3 which built the wrong ant target and thus some of
>   its classes were missing from the final jar file. In addition I had
>   to patch src:android-tools-base because Google likes to work with
>   trove 1.0, which is ancient, so that we can use Debian's version.
> 
> * I skipped the fat32lib library for jobb because it didn't seem
>   crucial to me.
> 
> 
> We need lombok-ast for compiling the lint tool which in turn is used as
> part of the Android Gradle Plugin. I have made some progress but only
> after I used upstream's version of lombok and later Google's version of
> lombok-ast from
> 
> https://repo1.maven.org/maven2/com/android/tools/external/lombok/lombok-ast/0.2.3/
> 
> Those sources include some auto-generated java files that are usually
> created with TemplateProcessor.jar in lombok-ast. I think the issue here
> is that we must not change the build.path to /usr/share/java, which is
> convenient for finding Debian's system jar files, because the build
> system expects to find TemplateProcessor.jar on this path too. However
> this jar file is part of src:lombok-ast itself and just another target
> in the build process.
> 
> There are also several bugs in ivyplusplus and lombok and I intend to
> start over again with those three packages until I can built lombok-ast
> from source.

Great progress, thanks for the update!  Your lombok troubleshooting
sounds correct to me.  Also, upstream has been somewhat responsive to my
emails, so its worth trying.  I just emailed the addresses in the git
commits.

.hc

> That's it for now.
> 
> Regards,
> 
> Markus
> 
> 
> [1]
> 
> ./build/base/dvlib/build/libs/dvlib-24.5.0.jar
> ./build/base/annotations/build/libs/annotations-24.5.0.jar
> ./build/base/builder-test-api/build/libs/builder-test-api-1.5.0.jar
> ./build/base/rule-api/build/libs/rule-api-24.5.0.jar
> ./build/base/api-generator/build/libs/api-generator.jar
> ./build/base/draw9patch/build/libs/draw9patch-24.5.0.jar
> ./build/base/profile/build/libs/profile.jar
> ./build/base/ninepatch/build/libs/ninepatch-24.5.0.jar
> ./build/base/jack/jack-api/build/libs/jack-api-0.9.0.jar
> ./build/base/jack/jill-api/build/libs/jill-api-0.9.0.jar
> ./build/base/lint/build/libs/lint-24.5.0.jar
> ./build/base/lint-api/build/libs/lint-api-24.5.0.jar
> ./build/base/chartlib/build/libs/chartlib-24.5.0.jar
> ./build/base/ant-tasks/build/libs/ant-tasks-24.5.0.jar
> ./build/base/ddmlib/build/libs/ddmlib-24.5.0.jar
> ./build/base/manifest-merger/build/libs/manifest-merger-24.5.0.jar
> ./build/base/asset-studio/build/libs/asset-studio-24.5.0.jar
> ./build/base/archquery/build/libs/archquery-24.5.0.jar
> ./build/base/lint-tests/build/libs/lint-tests-24.5.0.jar
> ./build/base/sdklib/build/libs/sdklib-24.5.0.jar
> ./build/base/gradle/build/libs/gradle-1.5.0.jar
> ./build/base/gradle-core/build/libs/gradle-core-1.5.0.jar
> ./build/base/sdklib-test/build/libs/sdklib-test-24.5.0.jar
> ./build/base/perflib/build/libs/perflib-24.5.0.jar
> ./build/base/layoutlib-api/build/libs/layoutlib-api-24.5.0.jar
> ./build/base/testutils/build/libs/testutils-24.5.0.jar
> ./build/base/google-services/build/libs/google-services-1.5.0.jar
> ./build/base/builder-model/build/libs/builder-model-1.5.0.jar
> ./build/base/sdk-common/build/libs/sdk-common-24.5.0.jar
> ./build/base/screenshot2/build/libs/screenshot2-24.5.0.jar
> ./build/base/builder/build/libs/builder-1.5.0.jar
> ./build/base/common/build/libs/common-24.5.0.jar
> ./build/base/lint-checks/build/libs/lint-checks-24.5.0.jar
> 
> 
> 
> _______________________________________________
> 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