[Android-tools-devel] last error in -tools-base: Could not find com.android.tools.analytics-library:protos:.

Hans-Christoph Steiner hans at at.or.at
Mon Jan 16 11:10:56 UTC 2017


So it looks like almost everything needed from intellij is packaged
upstream in uast.jar, i.e. inside of Android Studio:
gradle/m2repository/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar

The others come from the core libs of IntelliJ which are very large:

$ ls -lh lib/openapi.jar lib/idea.jar
gradle/m2repository/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar

-rw-rw-r-- 1 hans hans 149M Dez  9 14:49 lib/idea.jar
-rw-rw-r-- 1 hans hans  18M Dez  9 14:49 lib/openapi.jar
-rw-rw-r-- 1 hans hans 785K Dez  9 14:49
gradle/m2repository/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar

If we're lucky, we can extract those random things not in uast.jar
without needing tons of other things.  I checked all this by first
logging all jars in Android Studio that include classes in com.intellij.psi:

for f in `find * -name \*.jar`; do
  body=`unzip -l $f | grep com/intellij/psi` \
    && printf "$body" | cut -b 30-222 | sort  > /tmp/`echo $f | sed
s,/,_,g`.log
done

Then checking all com.intellij.* classes in -tools-base:

for f in `find * -name \*.java|xargs grep --fixed-strings
com.intellij.|grep import| cut -d : -f 2-222|sort -u | sed 's,^import
\(.*\);,\1,g' | sed 's,\.,/,g'`; do grep --fixed-strings $f
/tmp/*.jar.log; done| cut -d : -f 1|sort -u

.hc

殷啟聰:
> Hi,
> 
> The error is due to we didn't specify a version for the
> analytics-library dependencies, and I have fixed it.
> 
> However this error is nowhere near the last one. So far I conclude
> that we at least need to do the following in in order to be able to
> build android-platform-tools-base 2.2.2:
> 
>   * Package [1] and [2] from IntelliJ IDEA (mostly com.intellij.psi
> package) - Needed by linter-api
> 
> Would be quite tricky since soft freeze disallow new packages and
> IntelliJ IDEA is a huge pacakge.
> 
> [1]: https://github.com/JetBrains/intellij-community/tree/master/java/java-psi-api
> [2]: https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/openapi/util/TextRange.java
> 
> 2017-01-14 16:16 GMT+08:00 殷啟聰 <seamlikok at gmail.com>:
>> Hi Hans,
>>
>> I'm looking at the codes. First I'll need to re-import the upstream
>> since the binary files are not excluded in "master" branch.
>>
>> 2016-12-29 19:38 GMT+08:00 Hans-Christoph Steiner <hans at at.or.at>:
>>>
>>> I just uploaded jimfs to NEW, which is required by
>>> android-platform-tools-base v2.2.2.  That's the final dep required for
>>> the 2.2.2 upgrade.  We can't ship stretch with v2.0.0 since that does
>>> not work at all with gradle-3.x.  It exits with an error saying using
>>> gradle 2.10, and stretch does not ship gradle 2.x.  I think we'll get
>>> these updates into stretch past the freeze since all of these packages
>>> need to be the right versions to work together.
>>>
>>> This is the last error in the android-platform-tools-base update, which
>>> is totally stumping me:
>>>
>>> * Where:
>>> Script
>>> '/export/share/code/android-tools/android-platform-tools-base/debian/generateClasspath.gradle'
>>> line: 10
>>>
>>> * What went wrong:
>>> Execution failed for task ':base:builder:generateClasspath'.
>>>> Could not resolve all dependencies for configuration ':base:builder:runtime'.
>>>    > Could not find com.android.tools.analytics-library:protos:.
>>>      Searched in the following locations:
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/protos//protos-.pom
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/protos//protos-.jar
>>>      Required by:
>>>          project :base:builder
>>>    > Could not find com.android.tools.analytics-library:shared:.
>>>      Searched in the following locations:
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/shared//shared-.pom
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/shared//shared-.jar
>>>      Required by:
>>>          project :base:builder
>>>    > Could not find com.android.tools.analytics-library:tracker:.
>>>      Searched in the following locations:
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/tracker//tracker-.pom
>>>
>>> file:/usr/share/maven-repo/com/android/tools/analytics-library/tracker//tracker-.jar
>>>      Required by:
>>>          project :base:builder
>>>          project :base:builder > project :base:profile
>>>
>>>
>>> Here's jimfs:
>>> https://anonscm.debian.org/git/pkg-java/jimfs.git
>>>
>>> I've never done a maven or gradle package before, so both of these could
>>> use some proper style from someone who knows it.
>>>
>>> .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