Commit ae3f347b authored by hd's avatar hd
Browse files

推送原版本SDK,仅对接了新平台接口

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
**/.gradle
**/._*
**/.DS_Store
**/*.iml
**/.idea
**/local.properties
**/build
**/.externalNativeBuild
~$*
temp
handover
demo
groovy*
javalib
**/GameSDK_Other
\ No newline at end of file
/build
/proguard
*.iml
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'com.kezong.fat-aar'
android {
compileSdkVersion COMPILE_SDK_VERSION
defaultConfig {
minSdkVersion MIN_SDK_VERSION
targetSdkVersion TARGET_SDK_VERSION
versionCode SDK_VERSION_CODE as int
versionName SDK_VRESION_NAME
ndk { abiFilters 'armeabi-v7a', 'x86' }
}
buildTypes {
release {
zipAlignEnabled true
shrinkResources false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "default"
lintOptions {
abortOnError false
checkReleaseBuilds false
disable 'MissingTranslation'
}
libraryVariants.all { variant ->
variant.outputs.all { output ->
if (variant.buildType.name == "release") {
outputFileName = "${SDK_NAME}"
variant.getPackageLibrary().destinationDir = new File(project.rootDir.absolutePath
+ "/${Boolean.valueOf(OUT_PUT_SDK_API) ? "app_api" : "app"}/libs")
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}
packagingOptions {
doNotStrip "*/armeabi-v7a/*.so"
doNotStrip "*/x86/*.so"
doNotStrip "*/arm64-v8a/*.so"
doNotStrip "*/x86_64/*.so"
doNotStrip "armeabi/*.so"
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.SUPPORT_V4
List<String> projectNameList = OPEN_UP_PROJECT_ARRAYS.split(",")
def real_name = ""
for (String name : projectNameList) {
if (name.contains("Main")) {
real_name = name
} else {
real_name = "${name.trim().split("_")[0]}"
}
debugApi project(path: ":GameSDK_Project_$real_name")
}
gradle.startParameter.getTaskNames().each { task ->
if (task.contains("Release")) {
for (String name : projectNameList) {
if (name.contains("Main")) {
real_name = name
} else {
real_name = "${name.trim().split("_")[0]}"
}
embed project(path: ":GameSDK_Project_$real_name", configuration: 'default')
}
}
}
}
\ No newline at end of file
# ===================api======================
-keep class com.dwg.sdk.DGGameSdk { *;}
-keep class com.dwg.sdk.DGGameLife { *;}
-keep class com.dwg.sdk.DGGameExtend { *;}
-keep class com.dwg.sdk.DGGameConfig { *;}
-keep class com.dwg.sdk.DGGameVersion { *;}
-keep class com.dwg.sdk.DGGameApplication { *;}
-keep class com.dwg.sdk.DGGameSplashActivity { *;}
\ No newline at end of file
#================ sdk general proguard rules ===============
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
-renamesourcefileattribute SourceFile
# 基本操作 copy from sdk/tools/proguard/proguard-android-optimize.txt
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-allowaccessmodification
# The remainder of this file is identical to the non-optimized version
# of the Proguard configuration file (except that the other file has
# flags to turn off optimization).
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
# -dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keep class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
#-keepclassmembers public class * extends android.view.View {
# void set*(***);
# *** get*();
#}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
#-keepattributes Exceptions,InnerClasses
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-keepattributes *Annotation*
# Understand the @Keep support annotation.
-keep class android.support.annotation.Keep
-keep @android.support.annotation.Keep class * {*;}
-keep @com.td.framework.moudle.db.annotation.* class * {*;}
-keep class * extends java.lang.annotation.Annotation { *; }
-keep interface * extends java.lang.annotation.Annotation { *; }
-keepclasseswithmembers class * {
@android.support.annotation.Keep <methods>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <init>(...);
}
# custom
-optimizationpasses 9 #指定代码的压缩级别
-dontusemixedcaseclassnames #是否使用大小写混合
-dontskipnonpubliclibraryclasses #不去忽略非公共的库类
-dontskipnonpubliclibraryclassmembers #指定不去忽略包可见的库类的成员
-dontpreverify #混淆时是否做预校验
-verbose #混淆时是否记录日志
#混淆时所采用的算法
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
#避免混淆泛型 如果混淆报错建议关掉
-keepattributes Signature
#忽略警告
-ignorewarnings
#列出从 apk 中删除的代码
-printusage proguard/unused.txt
#混淆前后的映射
-printmapping proguard/mapping.txt
#未混淆的类和成员
-printseeds proguard/seeds.txt
-dontwarn android.support.v4.**
-keep public class * extends android.app.Fragment
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
#-keepclassmembernames public class * extends android.support.v4.app.**
-keep class android.support.v4.** { *; }
-keepclassmembernames public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
void set*(...);
*** get*();
!private <fields>;
public static <fields>;
}
#-keepnames class * implements java.io.Serializable
-keepclassmembernames class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
void set*(...);
*** get*();
}
#webView
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, jav.lang.String);
}
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes *JavascriptInterface*
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
#jni
-keepclasseswithmembers class * {
... *JNI*(...);
}
-keepclasseswithmembernames class * {
... *JRI*(...);
}
-keep class **JNI* {*;}
#-assumenosideeffects class android.util.Log {
# public static *** d(...);
# public static *** e(...);
# public static *** i(...);
# public static *** v(...);
# public static *** println(...);
# public static *** w(...);
# public static *** wtf(...);
#}
\ No newline at end of file
#================ sdk general proguard rules ===============
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
-renamesourcefileattribute SourceFile
# 基本操作 copy from sdk/tools/proguard/proguard-android-optimize.txt
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-allowaccessmodification
# The remainder of this file is identical to the non-optimized version
# of the Proguard configuration file (except that the other file has
# flags to turn off optimization).
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
# -dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keep class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
#-keepclassmembers public class * extends android.view.View {
# void set*(***);
# *** get*();
#}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
#-keepattributes Exceptions,InnerClasses
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-keepattributes *Annotation*
# Understand the @Keep support annotation.
-keep class android.support.annotation.Keep
-keep @android.support.annotation.Keep class * {*;}
-keep @com.td.framework.moudle.db.annotation.* class * {*;}
-keep class * extends java.lang.annotation.Annotation { *; }
-keep interface * extends java.lang.annotation.Annotation { *; }
-keepclasseswithmembers class * {
@android.support.annotation.Keep <methods>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <init>(...);
}
# custom
-optimizationpasses 9 #指定代码的压缩级别
-dontusemixedcaseclassnames #是否使用大小写混合
-dontskipnonpubliclibraryclasses #不去忽略非公共的库类
-dontskipnonpubliclibraryclassmembers #指定不去忽略包可见的库类的成员
-dontpreverify #混淆时是否做预校验
-verbose #混淆时是否记录日志
#混淆时所采用的算法
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
#避免混淆泛型 如果混淆报错建议关掉
-keepattributes Signature
#忽略警告
-ignorewarnings
#列出从 apk 中删除的代码
-printusage proguard/unused.txt
#混淆前后的映射
-printmapping proguard/mapping.txt
#未混淆的类和成员
-printseeds proguard/seeds.txt
-dontwarn android.support.v4.**
-keep public class * extends android.app.Fragment
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
#-keepclassmembernames public class * extends android.support.v4.app.**
-keep class android.support.v4.** { *; }
-keepclassmembernames public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
void set*(...);
*** get*();
!private <fields>;
public static <fields>;
}
#-keepnames class * implements java.io.Serializable
-keepclassmembernames class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
void set*(...);
*** get*();
}
#webView
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
public boolean *(android.webkit.WebView, java.lang.String);
}
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView, jav.lang.String);
}
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepattributes *JavascriptInterface*
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
#jni
-keepclasseswithmembers class * {
... *JNI*(...);
}
-keepclasseswithmembernames class * {
... *JRI*(...);
}
-keep class **JNI* {*;}
#-assumenosideeffects class android.util.Log {
# public static *** d(...);
# public static *** e(...);
# public static *** i(...);
# public static *** v(...);
# public static *** println(...);
# public static *** w(...);
# public static *** wtf(...);
#}
# ===================api======================
-keep class com.dwg.sdk.DGGameSdk { *;}
-keep class com.dwg.sdk.DGGameLife { *;}
-keep class com.dwg.sdk.DGGameExtend { *;}
-keep class com.dwg.sdk.DGGameConfig { *;}
-keep class com.dwg.sdk.DGGameVersion { *;}
-keep class com.dwg.sdk.DGGameApplication { *;}
-keep class com.dwg.sdk.DGGameSplashActivity { *;}
#================ channel common proguard rules ===============
#================ channel common base proguard rules ===============
#================ channel main-new proguard rules ===============
-keep class com.dwg.sdk.main.DWGApplication{*;}
-keepclassmembernames class com.dwg.sdk.main.DWSdkControl{ *;}
-keepclassmembernames class * extends com.dwg.sdk.main.activity.BaseActivity
-keepclassmembernames class com.dwg.sdk.main.activity.*{
public protected <methods>;
public protected abstract void ***(...);
}
-keep class com.dwg.sdk.main.modle.*{*;}
#other
-keep class com.android.webview.chromium.WebViewContentsClientAdapter.**{*;}
-keep public class com.netease.nis.captcha.**{*;}
-keep public class android.webkit.**{*;}
#bugly
-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}
#================ manager flow proguard rules ===============
#================ manager init proguard rules ===============
#================ oaid 1013 ===============
-keep, includedescriptorclasses class com.asus.msa.SupplementaryDID.** { *; }
-keepclasseswithmembernames class com.asus.msa.SupplementaryDID.** { *; }
-keep, includedescriptorclasses class com.asus.msa.sdid.** { *; }
-keepclasseswithmembernames class com.asus.msa.sdid.** { *; }
-keep class com.bun.** {*;}
-keep class com.asus.msa.** {*;}
-keep class com.heytap.openid.** {*;}
-keep class com.huawei.android.hms.pps.** {*;}
-keep class com.meizu.flyme.openidsdk.** {*;}
-keep class com.samsung.android.deviceidservice.** {*;}
-keep class com.zui.** {*;}
-keep class com.huawei.hms.ads.** {*; }
-keep interface com.huawei.hms.ads.** {*; }
-keepattributes *Annotation*
-keep @android.support.annotation.Keep class **{
@android.support.annotation.Keep <fields>;
@android.support.annotation.Keep <methods>;
}
#================ plugin aqy proguard rules ===============
-dontwarn com.iqiyi.qilin.trans.**
-keep class com.iqiyi.qilin.trans.** {*;}
#================ plugin base proguard rules ===============
#================ plugin bugly proguard rules ===============
-dontwarn com.tencent.bugly.**
-keep public class com.tencent.bugly.**{*;}
#================ plugin downloader proguard rules ===============
#================ plugin emulator proguard rules ===============
-keep class com.snail.antifake.**{*;}
#================ plugin ks proguard rules ===============
#================ plugin oaid proguard rules ===============
#================ plugin onelogin proguard rules ===============
-dontwarn com.geetest.onelogin.**
-keep class com.geetest.onelogin.** {
*;
}
-dontwarn com.geetest.onepassv2.**
-keep class com.geetest.onepassv2.** {
*;
}
-dontwarn com.geetest.deepknow.**
-keep class com.geetest.deepknow.** {
*;
}
-dontwarn com.geetest.mobinfo.**
-keep class com.geetest.mobinfo.** {
*;
}
-dontwarn com.cmic.sso.sdk.**
-keep class com.cmic.sso.sdk.** {
*;
}
-dontwarn com.unigeetest.**
-keep class com.unigeetest.** {
*;
}
-dontwarn cn.com.chinatelecom.account.**
-keep class cn.com.chinatelecom.account.** {
*;
}
#================ plugin permission proguard rules ===============
-dontwarn com.dwg.sdk.common.frame.permissionx.**
-keep class com.dwg.sdk.common.frame.permissionx.* {*;}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
#================ plugin tt proguard rules ===============
-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontwarn com.tencent.smtt.sdk.WebView
-dontwarn com.tencent.smtt.sdk.WebChromeClient
-dontwarn androidx.annotation.Nullable
-dontwarn androidx.annotation.NonNull
-dontwarn com.google.android.gms.ads.identifier.AdvertisingIdClient
-dontwarn com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
-dontwarn androidx.appcompat.app.AlertDialog
-dontwarn androidx.appcompat.view.menu.ListMenuItemView
-dontwarn androidx.recyclerview.widget.RecyclerView
-dontwarn androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-dontwarn androidx.viewpager.widget.ViewPager
-dontwarn androidx.recyclerview.widget.RecyclerView
-dontwarn androidx.annotation.RequiresApi
-dontwarn androidx.fragment.app.FragmentActivity
-dontwarn androidx.fragment.app.Fragment
-dontwarn androidx.annotation.AnyThread
-dontwarn androidx.annotation.WorkerThread
-keep class com.bytedance.applog.picker.DomSender { public *; }
-keep class com.bytedance.dr.VivoIdentifier {*;}
-keep class com.bytedance.dr.VivoIdentifier$* {*;}
#================ plugin uc proguard rules ===============
-keepclasseswithmembernames class * {
native <methods>;
}
-dontwarn com.gism.**
#================ project main proguard rules ===============
#================ utils base proguard rules ===============
-keepattributes Signature
-keepattributes MethodParameters
-keepparameternames
-keep public class * extends com.dwg.sdk.common.callback.DGameBaseCallback{*;}
-keep public class * extends com.dwg.sdk.common.listener.DGBaseListener{*;}
-keep public class * extends com.dwg.sdk.common.params.BaseParams{*;}
-keep public class * extends com.dwg.sdk.common.info.BaseInfo{*;}
-keep class com.dwg.sdk.common.utils.DGResUtil {public *;}
-keep class com.dwg.sdk.common.utils.SystemUtil {public *;}
#避免Log打印输出Annotation
#-assumenosideeffects class com.dwg.sdk.common.util.Debug {
# public static *** i(...);
# public static *** d(...);
# public static *** e(...);
# public static *** w(...);
# public static *** v(...);
#}
#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.dwg.sdk.common.frame.google.gson.stream.* { *; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.dwg.sdk.common.frame.google.gson.TypeAdapter
-keep class * implements com.dwg.sdk.common.frame.google.gson.TypeAdapterFactory
-keep class * implements com.dwg.sdk.common.frame.google.gson.JsonSerializer
-keep class * implements com.dwg.sdk.common.frame.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.dwg.sdk.common.frame.google.gson.annotations.SerializedName <fields>;
}
##---------------End: proguard configuration for Gson ----------
# frame
#-keep class com.dwg.sdk.common.frame.** {*;}
# Glide
-keep public class * implements com.dwg.sdk.common.frame.glide.module.GlideModule
-keep public enum com.dwg.sdk.common.frame.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
<manifest package="com.dwg.sdk" />
\ No newline at end of file
[
]
\ No newline at end of file
[
{"plugin_name":"plugin_oaid","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.oaid.OAIDPlugin","description":"OAID插件","version":"1.0.13"},
{"plugin_name":"plugin_bugly","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.bugly.BuglyPlugin","description":"BuglyCrash监控插件","version":"3.2.422"},
{"plugin_name":"plugin_permission","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.permission.PermissionPlugin","description":"权限请求插件","version":"1.4.0"},
{"plugin_name":"plugin_downloader","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.downloader.DownloaderPlugin","description":"文件下载插件","version":"1.7.7"},
{"plugin_name":"plugin_emulator","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.emulator.EmulatorPlugin","description":"模拟器检测插件","version":"1.1.2"},
{"plugin_name":"plugin_onelogin","plugin_type":"plugin_type_tool","class_name":"com.dwg.sdk.plugin.onelogin.OneLoginPlugin","description":"OenLogin一键登录插件","version":"2.4.1"}
]
\ No newline at end of file
[
{"project_name":"project_main","project_type":"project_type_main","class_name":"com.dwg.sdk.project.MainProject","description":"自主项目","version":"1.0.0"}
]
\ No newline at end of file
[
{"sdk_version_name":"1.7","sdk_version_code":"17","update_time":"2021-08-26 16:43:05"}
]
\ No newline at end of file
package com.dwg.sdk;
import com.dwg.sdk.common.parse.project.BaseProject;
import com.dwg.sdk.common.parse.project.ProjectManager;
/**
* create by hd on 2020/9/8
*/
abstract class DGBase {
protected BaseProject project;
public DGBase() {
project = ProjectManager.getInstance().get();
}
}
package com.dwg.sdk;
import com.dwg.sdk.project.ProjectApplication;
/**
* create by hd on 2020/9/7
*/
public class DGGameApplication extends ProjectApplication {
}
package com.dwg.sdk;
import android.annotation.SuppressLint;
import com.dwg.sdk.common.info.ChannelInfo;
import com.dwg.sdk.common.info.PluginInfo;
import com.dwg.sdk.common.info.ProjectInfo;
import com.dwg.sdk.common.listener.DGConfigListener;
import java.util.List;
/**
* create by hd on 2020/9/28
* 工程配置
*/
public class DGGameConfig extends DGBase implements DGConfigListener {
@SuppressLint("StaticFieldLeak")
private static volatile DGGameConfig sInstance;
private DGGameConfig() {
super();
}
public static DGGameConfig getInstance() {
if (sInstance == null) {
synchronized (DGGameConfig.class) {
if (sInstance == null) {
sInstance = new DGGameConfig();
}
}
}
return sInstance;
}
@Override
public List<ProjectInfo> getProjectList() {
return project.getProjectList();
}
@Override
public List<ChannelInfo> getChannelList() {
return project.getChannelList();
}
@Override
public List<PluginInfo> getPluginList() {
return project.getPluginList();
}
}
package com.dwg.sdk;
import android.annotation.SuppressLint;
import android.app.Activity;
import com.dwg.sdk.common.callback.DGNotifyResultCallback;
import com.dwg.sdk.common.info.BindPhoneInfo;
import com.dwg.sdk.common.info.DGUserInfo;
import com.dwg.sdk.common.info.RealNameInfo;
import com.dwg.sdk.common.info.VerificationCodeInfo;
import com.dwg.sdk.common.listener.DGOAIDProxy;
import com.dwg.sdk.common.params.GamePayParams;
/**
* create by hd on 2020/11/17
* 对外扩展接口
*/
public class DGGameExtend extends DGBase {
@SuppressLint("StaticFieldLeak")
private volatile static DGGameExtend sInstance;
private DGGameExtend() {
}
public static DGGameExtend getInstance() {
if (sInstance == null) {
synchronized (DGGameExtend.class) {
if (sInstance == null) {
sInstance = new DGGameExtend();
}
}
}
return sInstance;
}
public void doRealName(DGUserInfo info, String name, String idCard, DGNotifyResultCallback<RealNameInfo> callback) {
project.doRealName(info, name, idCard, callback);
}
public void doGetPhoneVerificationCode(String phoneNumber, DGNotifyResultCallback<VerificationCodeInfo> callback) {
project.doGetPhoneVerificationCode(phoneNumber, callback);
}
public void doBindPhone(DGUserInfo info, String phone, String code, DGNotifyResultCallback<BindPhoneInfo> callback) {
project.doBindPhone(info, phone, code, callback);
}
public void doCheckBindPhone(DGUserInfo info, DGNotifyResultCallback<BindPhoneInfo> callback) {
project.doCheckBindPhone(info, callback);
}
public void doCheckRealName(DGUserInfo info, DGNotifyResultCallback<RealNameInfo> callback) {
project.doCheckRealName(info, callback);
}
public void doOldPay(Activity activity, GamePayParams payParams) {
project.doOldPay(activity, payParams);
}
public void addOAIDProxy(DGOAIDProxy proxy) {
project.addOAIDProxy(proxy);
}
}
package com.dwg.sdk;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import com.dwg.sdk.common.listener.DGLifeCycleListener;
/**
* create by hd on 2020/9/8
* 对外开放的生命周期管理
*/
public class DGGameLife extends DGBase implements DGLifeCycleListener {
@SuppressLint("StaticFieldLeak")
private static volatile DGGameLife sInstance;
private DGGameLife() {
super();
}
public static DGGameLife getInstance() {
if (sInstance == null) {
synchronized (DGGameLife.class) {
if (sInstance == null) {
sInstance = new DGGameLife();
}
}
}
return sInstance;
}
@Override
public void onCreate(Activity activity, Bundle savedInstanceState) {
project.onCreate(activity, savedInstanceState);
}
@Override
public void onStart(Activity activity) {
project.onStart(activity);
}
@Override
public void onRestart(Activity activity) {
project.onRestart(activity);
}
@Override
public void onResume(Activity activity) {
project.onResume(activity);
}
@Override
public void onPause(Activity activity) {
project.onPause(activity);
}
@Override
public void onStop(Activity activity) {
project.onStop(activity);
}
@Override
public void onDestroy(Activity activity) {
project.onDestroy(activity);
}
@Override
public void onNewIntent(Activity activity, Intent intent) {
project.onNewIntent(activity, intent);
}
@Override
public void onSaveInstanceState(Bundle outState) {
project.onSaveInstanceState(outState);
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
project.onRestoreInstanceState(savedInstanceState);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
project.onConfigurationChanged(newConfig);
}
@Override
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
project.onActivityResult(activity, requestCode, resultCode, data);
}
@Override
public void onRequestPermissionsResult(Activity activity, int requestCode, String[] permissions, int[] grantResults) {
project.onRequestPermissionsResult(activity, requestCode, permissions, grantResults);
}
}
package com.dwg.sdk;
import android.annotation.SuppressLint;
import android.app.Activity;
import com.dwg.sdk.common.callback.DGameLogCallback;
import com.dwg.sdk.common.callback.DGameSdkCallBack;
import com.dwg.sdk.common.enums.NetType;
import com.dwg.sdk.common.info.DGUserInfo;
import com.dwg.sdk.common.listener.DGNetConfigListener;
import com.dwg.sdk.common.listener.DGSdkCpListener;
import com.dwg.sdk.common.listener.DGUserListener;
import com.dwg.sdk.common.params.GamePayParams;
import com.dwg.sdk.common.params.GameRoleParams;
/**
* create by hd on 2020/9/7
* 对外开放的基础逻辑
*/
public class DGGameSdk extends DGBase implements DGSdkCpListener, DGNetConfigListener, DGUserListener {
@SuppressLint("StaticFieldLeak")
private static volatile DGGameSdk sInstance;
private DGGameSdk() {
super();
}
public static DGGameSdk getInstance() {
if (sInstance == null) {
synchronized (DGGameSdk.class) {
if (sInstance == null) {
sInstance = new DGGameSdk();
}
}
}
return sInstance;
}
@Override
public void init(Activity activity, DGameSdkCallBack callBack, DGameLogCallback logCallback) {
project.init(activity, callBack, logCallback);
}
@Override
public void init(Activity activity, DGameSdkCallBack callBack) {
init(activity, callBack, null);
}
@Override
public void login(Activity activity) {
project.login(activity);
}
@Override
public void logout(Activity activity) {
project.logout(activity);
}
@Override
public void switchAccount(Activity activity) {
project.switchAccount(activity);
}
@Override
public void pay(Activity activity, GamePayParams payParams) {
project.pay(activity, payParams);
}
@Override
public void uploadGameRoleInfo(GameRoleParams roleParams) {
project.uploadGameRoleInfo(roleParams);
}
@Override
public void exit(Activity activity) {
project.exit(activity);
}
@Override
public void switchOfficeNet() {
project.switchOfficeNet();
}
@Override
public void switchCustomNet(NetType netType, String ip) {
project.switchCustomNet(netType, ip);
}
@Override
public NetType getNetType() {
return project.getNetType();
}
@Override
public String getNetIP(NetType netType) {
return project.getNetIP(netType);
}
@Override
public boolean checkLoginState() {
return project.checkLoginState();
}
@Override
public DGUserInfo getUserInfo() {
return project.getUserInfo();
}
}
package com.dwg.sdk;
import android.net.Uri;
import com.dwg.sdk.common.callback.DGameSplashCallback;
import com.dwg.sdk.common.listener.DGSplashListener;
import com.dwg.sdk.project.ProjectSplashActivity;
/**
* create by hd on 2020/9/8
* 开屏页
*/
public abstract class DGGameSplashActivity extends ProjectSplashActivity implements DGSplashListener, DGameSplashCallback {
@Override
public Uri setBgVideo() {
return null;
}
@Override
public int setBgImg() {
return 0;
}
@Override
public void showCompleted() {
super.showCompleted();
}
}
/build
/proguard
*.iml
\ No newline at end of file
【602游戏SDK_Android聚合】
1.接入文档:https://www.kancloud.cn/game602td/android_sdk_sdk602/773997
2.接入参数
参数(出包使用):
游戏ID:6033
通讯密钥:qzJ9kl4jntLitpWw41AvkEdePLfmRoN1
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment