#retrofit 2
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod
# Retrofit does reflection on method and parameter annotations.
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit
# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
#end of retrofit2
#gson
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }
# Prevent proguard from stripping interface information from TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
##---------------End: proguard configuration for Gson ----------
#end of gson
#glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
#end of glide
#kotlin
-keep class kotlin.** { *; }
-keep class kotlin.Metadata { *; }
-dontwarn kotlin.**
-keepclassmembers class **$WhenMappings {
<fields>;
}
-keepclassmembers class kotlin.Metadata {
public <fields>;
public <methods>;
}
#End of kotlin
#navergame sdk
# Application classes that will be serialized/deserialized over Gson
-keep class com.navercorp.nng.android.sdk.api.service** { *; }
-keep class com.navercorp.nng.android.sdk.api.entity.** { *; }
-keep class com.navercorp.nng.android.sdk.NNGLink** { *; }
-keep class com.navercorp.nng.android.sdk.NNGLink$Companion { *; }
-keepclassmembers class com.navercorp.nng.android.sdk.NNGLink {
public static ** Companion;
}
-keep class com.navercorp.nng.android.sdk.NNGConfig** { *; }
#end of sdk
public class MainActivity extends Activity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/**
* 네이버 아이디로 로그인 개발자 센터에서 받은 정보로 SDK를 초기화한다.
* Glink 클래스의 다른 메서드를 호출하기 전에 반드시 초기화를 먼저 해야 한다.
* 개발자 센터 주소: https://nid.naver.com/devcenter/main.nhn
*/
final String loungeId = "naver_game_4developer"";
final String clientId = "197CymaStozo7X5r2qR5";
final String clientSecret = "evCgKH1kJL";
NNGLink.initModule(this, loungeId, clientId, clientSecret );
...
}