facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
490 stars 257 forks source link

Should you remove aar file from package? #242

Closed Thaina closed 5 years ago

Thaina commented 5 years ago

7.15.1 also include aar file. Which cause duplicate jar entry when force resolve with play service resolver before build

studentutu commented 5 years ago

@Thaina try to use proguard file :

Adcolony For communication with AdColony's WebView

-keepclassmembers class * { @android.webkit.JavascriptInterface ; }

Adcolony Keep ADCNative class members unobfuscated

-keepclassmembers class com.adcolony.sdk.ADCNative* { ;}

Facebook SDK

-keep class com.facebook.unity.FB { *; } -keep class com.facebook.unity.FB.* { ; }

Admob

-keep class com.google.android.gms.ads.MobileAds { *; }

GameService Rules

-keep class com.google.android.gms.* { ; } -keep class com.google.games.bridge.* { ; }

Don't obfuscate. We only need dead code striping.

-dontobfuscate

-keep class com.google.unity.* { ; }

-keepclassmembers class com.ironsource.sdk.controller.IronSourceWebView$JSInterface { public ; } -keepclassmembers class implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keep public class com.google.android.gms.ads. { public *; } -keep class com.ironsource.adapters.* { ; } -keep class com.ironsource.unity.androidbridge. { *; }

-dontwarn com.ironsource.mediationsdk. -dontwarn com.ironsource.adapters. -dontwarn com.moat. -keep class com.moat. { public protected private *; }

Keep filenames and line numbers for stack traces

-keepattributes SourceFile,LineNumberTable

Keep JavascriptInterface for WebView bridge

-keepattributes JavascriptInterface

Sometimes keepattributes is not enough to keep annotations

-keep class android.webkit.JavascriptInterface { *; }

Keep all classes in Unity Ads package

-keep class com.unity3d.ads.* { ; }

Keep all classes in Unity Services package

-keep class com.unity3d.services.* { ; }

-dontwarn com.google.ar.core. -dontwarn com.unity3d.services. -dontwarn com.ironsource.adapters.unityads.**

KylinChang commented 5 years ago

In the latest version of UnitySDK we only includes wrapper aar and the issue should be fixed.