Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildscripts: add android-interop-test build (without runing test) in kokoro android #5531

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

dapengzhang0
Copy link
Member

No description provided.

@dapengzhang0
Copy link
Member Author

Android Kokoro task is expected to fail before #5523 is fixed.

@dapengzhang0
Copy link
Member Author

dapengzhang0 commented Apr 2, 2019

Android Kokoro (interop-test) build did fail as expected before #5525 is merged
https://sponge.corp.google.com/target?id=255b2b55-3dae-4c52-8f17-854e4884fc39&target=grpc/java/master/presubmit/android&searchFor

@dapengzhang0
Copy link
Member Author

dapengzhang0 commented Apr 3, 2019

@TimvdLippe, Mockito 2 and Android plugin 3.3 still seem to have problem. With 'com.android.tools.build:gradle:3.3.0' or 'com.android.tools.build:gradle:3.3.2', and mockito 2.25.1, the build command

gradlew app:transformClassesAndResourcesWithProguardForRelease

fails with following warnings:

Reading program jar [/usr/local/google/home/zdapeng/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.9.7/8fea78fea6449e1738b675cb155ce8422661e237/byte-buddy-1.9.7.jar] (filtered)
Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
Reading program jar [/usr/local/google/home/zdapeng/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.9.7/8e7d1b599f4943851ffea125fd9780e572727fc0/byte-buddy-agent-1.9.7.jar] (filtered)
Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
...
Warning: there were 2 classes in incorrectly named files.
         You should make sure all file names correspond to their class names.
         The directory hierarchies must correspond to the package hierarchies.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
         If you don't mind the mentioned classes not being written out,
         you could try your luck using the '-ignorewarnings' option.
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
Thread(Tasks limiter_2): destruction

> Task :app:transformClassesAndResourcesWithProguardForRelease FAILED

This seems a bug. Adding -dontwarn module-info and run the build command again, the above issue is passed but then it fails with

Warning: net.bytebuddy.agent.builder.ResettableClassFileTransformer: can't find superclass or interface java.lang.instrument.ClassFileTransformer
Warning: net.bytebuddy.dynamic.ClassFileLocator$AgentBased$ExtractionClassFileTransformer: can't find superclass or interface java.lang.instrument.ClassFileTransformer
Warning: net.bytebuddy.dynamic.loading.ClassReloadingStrategy$Strategy$ClassRedefinitionTransformer: can't find superclass or interface java.lang.instrument.ClassFileTransformer
...
[A lot of Warnings]
...
Warning: there were 668 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.

This still seems a bug. I have to apply the workaround mockito/mockito#1511 (comment) to downgrade net.bytebuddy explicitly, and then the build could pass.

@TimvdLippe
Copy link
Contributor

That is a Proguard bug (mockito/mockito#1511 (comment)): https://sourceforge.net/p/proguard/bugs/671/

I have heard from other teams that R8 has been working as intended: https://r8.googlesource.com/r8

@dapengzhang0
Copy link
Member Author

@TimvdLippe Thanks a lot for your notice. Then what would be the best workaround now? Apply mockito/mockito#1511 (comment) ?

@TimvdLippe
Copy link
Contributor

I would advise adopting R8 in favor of the (barely maintained) Proguard project.

@dapengzhang0 dapengzhang0 merged commit a17f8ab into master Apr 3, 2019
@dapengzhang0 dapengzhang0 deleted the dapengzhang0-patch-2 branch April 3, 2019 21:22
@lock lock bot locked as resolved and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants