Skip to content

Commit 0789411

Browse files
committed
Workaround for grpc-protobuf/guava-android/gradle-android issue
1 parent 45e9fb0 commit 0789411

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

plugin/core/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@
2323
<dependency>
2424
<groupId>com.github.singnet.snet-sdk-java</groupId>
2525
<artifactId>snet-sdk-java</artifactId>
26+
<exclusions>
27+
<!-- TODO:
28+
grpc-protobuf artifact depends on guava:28-android.
29+
Android guava version doesn't inherit NonSerializableMemoizingSupplier
30+
from java.util.function.Supplier which lead to error while using
31+
gradle plugin to build Android app:
32+
> Failed to apply plugin [id 'com.android.internal.application']
33+
> com.google.common.base.Suppliers$NonSerializableMemoizingSupplier cannot be cast to java.util.function.Supplier
34+
the workaround below replaces guava Android version by JRE version
35+
for plugins. It should be removed if guava is fixed.
36+
-->
37+
<exclusion>
38+
<groupId>com.google.guava</groupId>
39+
<artifactId>guava</artifactId>
40+
</exclusion>
41+
</exclusions>
42+
</dependency>
43+
<dependency>
44+
<groupId>com.google.guava</groupId>
45+
<artifactId>guava</artifactId>
46+
<!-- version 28.1 corresponds to the grpc version 1.28.0 -->
47+
<version>28.1-jre</version>
2648
</dependency>
2749
<dependency>
2850
<groupId>org.apache.commons</groupId>

0 commit comments

Comments
 (0)