awslabs / amazon-kinesis-video-streams-webrtc-sdk-android

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.
Apache License 2.0
58 stars 37 forks source link

Proguard rules #26

Closed prechtelm closed 1 year ago

prechtelm commented 4 years ago

Hi, please provide proper proguard rules for the project. Thanks.

KunNiu commented 3 years ago

Hi, this issue has been created more than 9 months, and I can't believe the proguard rules are so difficult to bring out. This really block app publish release version, could you please raise up the priority? Thanks!

KunNiu commented 3 years ago

@disa6302 , I tried to write the proguard rules my self as follows, it can work. But there must have some useless rules in it, could you please help to point them out, or reduce the rules? Thanks!

-keep class com.amazonaws. { *; } -keep class org.glassfish.* { ; } -keep class org.awaitility. { *; } -keep class com.google.common. { *; } -keep class com.google.thirdparty.* { ; } -keep class com.google.gson. { *; } -keep class org.slf4j.* { ; } -keep class ch.qos.* { ; } -keepattributes Annotation -dontwarn ch.qos.logback.core.net.*

Keep all annotations.

-keepattributes Annotation,Exceptions

Keep all interfaces. This is required to run OSGi services.

-keep public interface *

Keep all Component classes

-keep @org.osgi.service.component.annotations.Component class *

Kepp all Component classes member functions with OSGi specific annotations

-keepclassmembers @org.osgi.service.component.annotations.Component class * {

Keep all methods with annotatios Reference.

@org.osgi.service.component.annotations.Reference *;

Keep all methods with annotatios Activate.

@org.osgi.service.component.annotations.Activate *; } -keep class org.apache.commons.logging. { ; } -keep class com.amazonaws.services.sqs.QueueUrlHandler { ; } -keep class com.amazonaws.javax.xml.transform.sax. { public ; } -keep class com.amazonaws.javax.xml.stream. { *; } -keep class com.amazonaws.services..model.Exception { *; } -keep class org.codehaus.* { ; } -keepattributes Signature,Annotation -dontwarn javax.xml.stream.events. -dontwarn org.codehaus.jackson. -dontwarn org.apache.commons.logging.impl. -dontwarn org.apache.http.conn.scheme. -keepattributes InnerClasses -keep class com.cloudwebrtc.webrtc. { *; } -keep class org.webrtc.* { ; }

Class names are needed in reflection

-keepnames class com.amazonaws. -keepnames class com.amazon.

Enums are not obfuscated correctly in combination with Gson

-keepclassmembers enum { ; }

Request handlers defined in request.handlers

-keep class com.amazonaws.services.*.Handler

The following are referenced but aren't required to run

-dontwarn com.fasterxml.jackson.**

Android 6.0 release removes support for the Apache HTTP client

-dontwarn org.apache.http.**

The SDK has several references of Apache HTTP client

-dontwarn com.amazonaws.http. -dontwarn com.amazonaws.metrics.