Explorar el Código

v1.0.0开发:使用provider进行初始化工作

#Suyghur hace 2 años
padre
commit
23456a4c60
Se han modificado 100 ficheros con 607 adiciones y 291 borrados
  1. 0 63
      demo/src/main/java/com/eyuancomm/demo/TestActivity.java
  2. 0 0
      demo/src/main/kotlin/com/eyuancomm/demo/CacheRoleInfo.kt
  3. 0 0
      demo/src/main/kotlin/com/eyuancomm/demo/DemoActivity.kt
  4. 0 0
      demo/src/main/kotlin/com/eyuancomm/demo/DemoApplication.kt
  5. 0 0
      demo/src/main/kotlin/com/eyuancomm/demo/EnvActivity.kt
  6. 0 0
      demo/src/main/kotlin/com/eyuancomm/demo/WelcomeActivity.kt
  7. 1 0
      library_base/.gitignore
  8. 61 0
      library_base/build.gradle
  9. 21 0
      library_base/proguard-rules.pro
  10. 110 0
      library_base/publish.gradle
  11. 8 0
      library_base/src/main/AndroidManifest.xml
  12. 8 0
      library_comm/build.gradle
  13. 7 0
      library_comm/src/main/AndroidManifest.xml
  14. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/Version.kt
  15. 86 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommInstaller.kt
  16. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommSdk.kt
  17. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommSdkApplication.kt
  18. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/ChannelId.kt
  19. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/Function.kt
  20. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/ResultInfo.kt
  21. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkChargeInfo.kt
  22. 12 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkEvent.kt
  23. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkLoginInfo.kt
  24. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkRoleInfo.kt
  25. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/MetaDataExt.kt
  26. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/ViewExt.kt
  27. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/ZipExt.kt
  28. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/CommSdkDrive.kt
  29. 43 47
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/CommSdkImpl.kt
  30. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/SdkProxyManager.kt
  31. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/ICallback.kt
  32. 32 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/ITrace.kt
  33. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IApplication.kt
  34. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IFeature.kt
  35. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IFloatBall.kt
  36. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/ILifeCycle.kt
  37. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IOrder.kt
  38. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IRoleData.kt
  39. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/Host.kt
  40. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/SdkRequest.kt
  41. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/VolleyRequest.kt
  42. 20 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/TraceEventManager.kt
  43. 118 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/channel/AdjustEventTrace.kt
  44. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/Logger.kt
  45. 1 1
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/MMKVUtils.kt
  46. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/ParamsUtils.kt
  47. 0 0
      library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/widget/ScaleLoadingDialog.kt
  48. 1 6
      module_eyuan/library_eyuan/build.gradle
  49. 4 4
      module_eyuan/library_eyuan/src/main/cpp/logger.cpp
  50. 0 94
      module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/Logger.kt
  51. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/EYuanGameSdk.kt
  52. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/Version.kt
  53. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/ClickType.kt
  54. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/FloatFeature.kt
  55. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/LoginType.kt
  56. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/ResultInfo.kt
  57. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkBackLoginInfo.kt
  58. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkChargeInfo.kt
  59. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkEvent.kt
  60. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkRoleInfo.kt
  61. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/Session.kt
  62. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/bean/init/FloatCfg.kt
  63. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/bean/init/InitBean.kt
  64. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/CountDownTimerExt.kt
  65. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/StringFilterExt.kt
  66. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/ViewExt.kt
  67. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/ZipExt.kt
  68. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/GameSdkDrive.kt
  69. 50 53
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/GameSdkImpl.kt
  70. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/SdkJsImpl.kt
  71. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindAccountContainer.kt
  72. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindEmailContainer.kt
  73. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindPhoneContainer.kt
  74. 1 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/HybridFeatureContainer.kt
  75. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/MemberCenterContainer.kt
  76. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/ModifyPwdContainer.kt
  77. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/floatball/FloatCenterService.kt
  78. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/floatball/FloatCenterServiceManager.kt
  79. 2 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/iab/ChargeImpl.kt
  80. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/iab/InAppBilling.kt
  81. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/LoginActivity.kt
  82. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/LoginFragmentPagerAdapter.kt
  83. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/UserSignInImpl.kt
  84. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/fragment/LauncherFragment.kt
  85. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/fragment/RegisterFragment.kt
  86. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/share/ShareImpl.kt
  87. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/ICallback.kt
  88. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/IFileRequestCallback.kt
  89. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/ITrace.kt
  90. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/Host.kt
  91. 4 4
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/SdkRequest.kt
  92. 1 1
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/VolleyRequest.kt
  93. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/TraceEventManager.kt
  94. 2 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceAdjustImpl.kt
  95. 2 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceFacebookImpl.kt
  96. 2 2
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceFirebaseImpl.kt
  97. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/LocalCacheUtils.kt
  98. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/ParamsUtils.kt
  99. 2 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/SessionUtils.kt
  100. 0 0
      module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/widget/EventEditText.kt

+ 0 - 63
demo/src/main/java/com/eyuancomm/demo/TestActivity.java

@@ -1,63 +0,0 @@
-package com.eyuancomm.demo;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.KeyEvent;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import cn.yyxx.eyuancomm.comm.EYuanCommSdk;
-import cn.yyxx.eyuancomm.comm.internal.ICallback;
-
-/**
- * @author #Suyghur.
- * Created on 2022/03/01
- */
-public class TestActivity extends Activity {
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        EYuanCommSdk.getInstance().initialize(this, true, new ICallback() {
-            @Override
-            public void onResult(int code, @NonNull String result) {
-                if (code == 0) {
-                    // SDK初始化成功设置浮标切换用户监听
-                    EYuanCommSdk.getInstance().setOnFloatBallLogout(new ICallback() {
-                        @Override
-                        public void onResult(int code2, @NonNull String result2) {
-                            if (code2 == 0) {
-                                // 用户触发浮标切换账号,游戏需退回到登录选服页,并调用SDK的login()接口拉起登录
-                            } else {
-                                // 预留,暂时无需处理
-                            }
-                        }
-                    });
-                }
-            }
-        });
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_BACK) {
-            if (EYuanCommSdk.getInstance().hasExitView(this)) {
-                EYuanCommSdk.getInstance().openExitView(this, new ICallback() {
-                    @Override
-                    public void onResult(int code, String result) {
-                        if (code == 0) {
-                            // 结束当前Activity
-                            // 如果要杀进程需要在onDestroy中处理,不然会不执行SDK的onDestroy方法
-                            finish();
-                        }
-                    }
-                });
-            } else {
-                // 显示游戏原生退出框
-            }
-            return true;
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-}

+ 0 - 0
demo/src/main/java/com/eyuancomm/demo/CacheRoleInfo.kt → demo/src/main/kotlin/com/eyuancomm/demo/CacheRoleInfo.kt


+ 0 - 0
demo/src/main/java/com/eyuancomm/demo/DemoActivity.kt → demo/src/main/kotlin/com/eyuancomm/demo/DemoActivity.kt


+ 0 - 0
demo/src/main/java/com/eyuancomm/demo/DemoApplication.kt → demo/src/main/kotlin/com/eyuancomm/demo/DemoApplication.kt


+ 0 - 0
demo/src/main/java/com/eyuancomm/demo/EnvActivity.kt → demo/src/main/kotlin/com/eyuancomm/demo/EnvActivity.kt


+ 0 - 0
demo/src/main/java/com/eyuancomm/demo/WelcomeActivity.kt → demo/src/main/kotlin/com/eyuancomm/demo/WelcomeActivity.kt


+ 1 - 0
library_base/.gitignore

@@ -0,0 +1 @@
+/build

+ 61 - 0
library_base/build.gradle

@@ -0,0 +1,61 @@
+plugins {
+    id 'com.android.library'
+    id 'kotlin-android'
+}
+
+android {
+    compileSdk rootProject.ext.android.compileSdk
+    buildToolsVersion rootProject.ext.android.buildToolsVersion
+
+    defaultConfig {
+        minSdk rootProject.ext.android.minSdk
+        targetSdk rootProject.ext.android.targetSdk
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles 'proguard-rules.pro'
+        }
+    }
+
+    buildFeatures {
+        buildConfig false
+    }
+
+    lintOptions {
+        abortOnError false
+    }
+
+    compileOptions {
+        kotlinOptions.freeCompilerArgs += ['-module-name', "cn.yyxx.eyuancomm.base"]
+    }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    kotlinOptions {
+        jvmTarget = "1.8"
+    }
+}
+
+dependencies {
+
+    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
+
+
+    //mmkv
+    api 'com.tencent:mmkv-static:1.2.10'
+
+    //日志采集框架
+    api 'io.github.suyghur.dolin:zap:1.0.0'
+
+    api files("../libs/yyxx_support_1.0.2.jar")
+    api files("../libs/oaid_sdk_1.0.25.jar")
+
+}
+
+apply from: 'publish.gradle'

+ 21 - 0
library_base/proguard-rules.pro

@@ -0,0 +1,21 @@
+# 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:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# 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

+ 110 - 0
library_base/publish.gradle

@@ -0,0 +1,110 @@
+apply plugin: 'maven-publish'
+apply plugin: 'signing'
+
+ext {
+    PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
+    PUBLISH_ARTIFACT_ID = 'eyuancomm-channel-lib-oppo'
+    PUBLISH_VERSION = '1.0.0-rc3'
+}
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+
+def ossrhUsername = properties.getProperty("SonaType.user")
+def ossrhPassword = properties.getProperty("SonaType.pwd")
+
+task androidSourcesJar(type: Jar) {
+    archiveClassifier.set('source')
+    if (project.plugins.findPlugin('com.android.library')) {
+        from android.sourceSets.main.java.srcDirs
+    } else {
+        form sourceSets.main.java.srcDirs
+    }
+    exclude "**/R.class"
+    exclude "**/BuildConfig.class"
+}
+
+publishing {
+    publications {
+        release(MavenPublication) {
+            // The coordinates of the library, being set from variables that
+            // we'll set up in a moment
+            groupId PUBLISH_GROUP_ID
+            artifactId PUBLISH_ARTIFACT_ID
+            version PUBLISH_VERSION
+
+            // Two artifacts, the `aar` and the sources
+            artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
+            artifact androidSourcesJar
+
+            // Self-explanatory metadata for the most part
+            pom {
+                name = "${PUBLISH_GROUP_ID}:${PUBLISH_ARTIFACT_ID}"
+                description = 'game comm sdk of eyuan'
+                // If your project has a dedicated site, use its URL here
+                url = 'https://github.com/yyxxgame'
+                licenses {
+                    license {
+                        // 协议类型,一般默认Apache License2.0的话不用改:
+                        name = 'The Apache License, Version 2.0'
+                        url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    }
+                }
+                developers {
+                    developer {
+                        id = 'yyxxgame'
+                        name = 'yyxxgame'
+                        email = 'developcentre@yyxxgame.com'
+                    }
+                }
+                // Version control info, if you're using GitHub, follow the format as seen here
+                scm {
+                    //修改成你的Git地址:
+                    connection = 'scm:git:gogs.yyxxgame.com:3000/Client/EYuanGameSdk-KTX.git'
+                    developerConnection = 'scm:git:ssh://gogs.yyxxgame.com:3000/Client/EYuanGameSdk-KTX.git'
+                    //分支地址:
+                    url = 'http://gogs.yyxxgame.com/Client/EYuanGameSdk-KTX'
+                }
+                // A slightly hacky fix so that your POM will include any transitive dependencies
+                // that your library builds upon
+                withXml {
+                    def dependenciesNode = asNode().appendNode('dependencies')
+                    for (def node : project.configurations.implementation.allDependencies) {
+                        if (node.group == "null" || node.name == "unspecified" || node.version == "null") {
+                            break
+                        }
+                        def dependencyNode = dependenciesNode.appendNode('dependency')
+                        dependencyNode.appendNode('groupId', node.group)
+                        dependencyNode.appendNode('artifactId', node.name)
+                        dependencyNode.appendNode('version', node.version)
+                    }
+                }
+            }
+        }
+    }
+    repositories {
+        // The repository to publish to, Sonatype/MavenCentral
+        maven {
+            // This is an arbitrary name, you may also use "mavencentral" or
+            // any other name that's descriptive for you
+            name = "mavencentral"
+
+            def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
+            def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
+            // You only need this if you want to publish snapshots, otherwise just set the URL
+            // to the release repo directly
+            url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
+
+            // The username and password we've fetched earlier
+            credentials {
+                username ossrhUsername
+                password ossrhPassword
+            }
+        }
+    }
+}
+signing {
+    sign publishing.publications
+}
+
+publishReleasePublicationToMavencentralRepository.dependsOn(assemble)

+ 8 - 0
library_base/src/main/AndroidManifest.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="cn.yyxx.eyuancomm.base">
+
+    <application android:allowBackup="true">
+
+    </application>
+</manifest>

+ 8 - 0
library_comm/build.gradle

@@ -67,6 +67,14 @@ dependencies {
     // 日志采集框架
     implementation 'io.github.suyghur.dolin:zap:1.0.0'
 
+    implementation 'com.adjust.sdk:adjust-android:4.28.2'
+
+    //mmkv
+    api 'com.tencent:mmkv-static:1.2.10'
+
+    //日志采集框架
+    api 'io.github.suyghur.dolin:zap:1.0.0'
+
     api files("../libs/yyxx_support_1.0.2.jar")
     api files("../libs/oaid_sdk_1.0.25.jar")
 }

+ 7 - 0
library_comm/src/main/AndroidManifest.xml

@@ -2,4 +2,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="cn.yyxx.eyuancomm.comm">
 
+    <application android:allowBackup="true">
+        <provider
+            android:name=".EYuanCommInstaller"
+            android:authorities="${applicationId}.eyuancomm-installer"
+            android:exported="false" />
+    </application>
+
 </manifest>

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/Version.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/Version.kt


+ 86 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommInstaller.kt

@@ -0,0 +1,86 @@
+package cn.yyxx.eyuancomm.comm
+
+import android.app.Application
+import android.content.ContentProvider
+import android.content.ContentValues
+import android.database.Cursor
+import android.net.Uri
+import cn.yyxx.eyuancomm.comm.impl.CommSdkDrive
+import cn.yyxx.eyuancomm.comm.network.Host
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
+import cn.yyxx.support.device.DeviceInfoUtils
+import cn.yyxx.support.gaid.GAIDUtils
+import cn.yyxx.support.msa.MsaDeviceIdsHandler
+
+/**
+ * @author #Suyghur.
+ * Created on 2022/03/08
+ */
+internal class EYuanCommInstaller : ContentProvider() {
+
+    companion object {
+        var hasReadDeviceId = false
+    }
+
+    override fun onCreate(): Boolean {
+        val application = context!!.applicationContext as Application
+        initGaid(application)
+        Logger.initZap(application)
+        MMKVUtils.instance.init(application)
+        CommSdkDrive.instance.initSdkDrive(application)
+        Host.initHostModel(application)
+        return true
+    }
+
+    private fun initGaid(application: Application) {
+        GAIDUtils.initGoogleAdid(application) { code, _ ->
+            if (code == 0) {
+                if (GAIDUtils.getGoogleAdid() == "00000000-0000-0000-0000-000000000000") {
+                    Logger.i("谷歌框架可以访问,gaid被限制跟踪,尝试使用oaid")
+                    initOaid(application)
+                } else {
+                    Logger.i("谷歌框架可以访问,请求gaid")
+                    CommSdkDrive.instance.setCommParam("device_id", GAIDUtils.getGoogleAdid())
+                    hasReadDeviceId = true
+                }
+            } else {
+                Logger.e("谷歌框架不可访问,尝试使用oaid")
+                initOaid(application)
+            }
+        }
+    }
+
+    private fun initOaid(application: Application) {
+        MsaDeviceIdsHandler.initMsaDeviceIds(application) { code, msg, _ ->
+            if (code == 0) {
+                Logger.e("获取oaid成功,使用oaid替代")
+                CommSdkDrive.instance.setCommParam("device_id", MsaDeviceIdsHandler.oaid)
+            } else {
+                Logger.d("获取oaid失败,msg: $msg,使用android id替代")
+                CommSdkDrive.instance.setCommParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+            }
+            hasReadDeviceId = true
+        }
+    }
+
+    override fun query(uri: Uri, projection: Array<out String>?, selection: String?, selectionArgs: Array<out String>?, sortOrder: String?): Cursor? {
+        return null
+    }
+
+    override fun getType(uri: Uri): String? {
+        return null
+    }
+
+    override fun insert(uri: Uri, values: ContentValues?): Uri? {
+        return null
+    }
+
+    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<out String>?): Int {
+        return 0
+    }
+
+    override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<out String>?): Int {
+        return 0
+    }
+}

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/EYuanCommSdk.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommSdk.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/EYuanCommSdkApplication.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/EYuanCommSdkApplication.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/ChannelId.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/ChannelId.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/Function.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/Function.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/ResultInfo.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/ResultInfo.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/SdkChargeInfo.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkChargeInfo.kt


+ 12 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkEvent.kt

@@ -0,0 +1,12 @@
+package cn.yyxx.eyuancomm.comm.entity
+
+/**
+ * @author #Suyghur.
+ * Created on 2021/07/08
+ */
+class SdkEvent {
+    var eventName: String = ""
+    var eventParams: String = ""
+    var standard: Boolean = false
+    var fbAliasName: String = ""
+}

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/SdkLoginInfo.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkLoginInfo.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/entity/SdkRoleInfo.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/entity/SdkRoleInfo.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/ext/MetaDataExt.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/MetaDataExt.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/ext/ViewExt.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/ViewExt.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/ext/ZipExt.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/ext/ZipExt.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/impl/CommSdkDrive.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/CommSdkDrive.kt


+ 43 - 47
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/impl/CommSdkImpl.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/CommSdkImpl.kt

@@ -5,6 +5,7 @@ import android.app.Application
 import android.content.Context
 import android.content.Intent
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.EYuanCommInstaller
 import cn.yyxx.eyuancomm.comm.entity.*
 import cn.yyxx.eyuancomm.comm.entity.Function
 import cn.yyxx.eyuancomm.comm.internal.ICallback
@@ -14,9 +15,6 @@ import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuancomm.comm.utils.ParamsUtils
 import cn.yyxx.eyuancomm.comm.widget.ScaleLoadingDialog
 import cn.yyxx.support.JsonUtils
-import cn.yyxx.support.device.DeviceInfoUtils
-import cn.yyxx.support.gaid.GAIDUtils
-import cn.yyxx.support.msa.MsaDeviceIdsHandler
 import org.json.JSONObject
 import java.util.concurrent.atomic.AtomicInteger
 
@@ -28,7 +26,8 @@ class CommSdkImpl(context: Context) {
 
     private var mSdkProxy: Any? = null
     private var hasSdkInit = false
-    private var hasReadDeviceId = false
+
+    //    private var hasReadDeviceId = false
     private var channelId: String = ""
 
     private var initLoadingDialog: ScaleLoadingDialog? = null
@@ -57,11 +56,9 @@ class CommSdkImpl(context: Context) {
      * 同步Application中的attachBaseContext
      */
     fun attachBaseContext(application: Application, context: Context) {
-        Logger.initZap(application)
-        Logger.i("EYuanCommSdk attachBaseContext ...")
-        CommSdkDrive.instance.initSdkDrive(application)
-        initGaid(application)
-
+//        Logger.i("EYuanCommSdk attachBaseContext ...")
+//        CommSdkDrive.instance.initSdkDrive(application)
+//        initGaid(application)
         if (mSdkProxy == null) {
             mSdkProxy = getSdkProxyManager(application)
         }
@@ -69,42 +66,42 @@ class CommSdkImpl(context: Context) {
     }
 
 
-    private fun initGaid(application: Application) {
-        GAIDUtils.initGoogleAdid(application) { code, _ ->
-            if (code == 0) {
-                if (GAIDUtils.getGoogleAdid() == "00000000-0000-0000-0000-000000000000") {
-                    Logger.i("谷歌框架可以访问,gaid被限制跟踪,尝试使用oaid")
-                    initOaid(application)
-                } else {
-                    Logger.i("谷歌框架可以访问,请求gaid")
-                    CommSdkDrive.instance.setCommParam("device_id", GAIDUtils.getGoogleAdid())
-                    hasReadDeviceId = true
-                }
-            } else {
-                Logger.e("谷歌框架不可访问,尝试使用oaid")
-                initOaid(application)
-            }
-        }
-    }
-
-    private fun initOaid(application: Application) {
-        MsaDeviceIdsHandler.initMsaDeviceIds(application) { code, msg, _ ->
-            if (code == 0) {
-                Logger.e("获取oaid成功,使用oaid替代")
-                CommSdkDrive.instance.setCommParam("device_id", MsaDeviceIdsHandler.oaid)
-            } else {
-                Logger.d("获取oaid失败,msg: $msg,使用android id替代")
-                CommSdkDrive.instance.setCommParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
-            }
-            hasReadDeviceId = true
-        }
-    }
+//    private fun initGaid(application: Application) {
+//        GAIDUtils.initGoogleAdid(application) { code, _ ->
+//            if (code == 0) {
+//                if (GAIDUtils.getGoogleAdid() == "00000000-0000-0000-0000-000000000000") {
+//                    Logger.i("谷歌框架可以访问,gaid被限制跟踪,尝试使用oaid")
+//                    initOaid(application)
+//                } else {
+//                    Logger.i("谷歌框架可以访问,请求gaid")
+//                    CommSdkDrive.instance.setCommParam("device_id", GAIDUtils.getGoogleAdid())
+//                    hasReadDeviceId = true
+//                }
+//            } else {
+//                Logger.e("谷歌框架不可访问,尝试使用oaid")
+//                initOaid(application)
+//            }
+//        }
+//    }
+//
+//    private fun initOaid(application: Application) {
+//        MsaDeviceIdsHandler.initMsaDeviceIds(application) { code, msg, _ ->
+//            if (code == 0) {
+//                Logger.e("获取oaid成功,使用oaid替代")
+//                CommSdkDrive.instance.setCommParam("device_id", MsaDeviceIdsHandler.oaid)
+//            } else {
+//                Logger.d("获取oaid失败,msg: $msg,使用android id替代")
+//                CommSdkDrive.instance.setCommParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+//            }
+//            hasReadDeviceId = true
+//        }
+//    }
 
     /**
      * 同步Application中的onCreate
      */
     fun initApplication(application: Application) {
-        Host.initHostModel(application)
+//        Host.initHostModel(application)
         if (mSdkProxy == null) {
             mSdkProxy = getSdkProxyManager(application)
         }
@@ -132,13 +129,13 @@ class CommSdkImpl(context: Context) {
             return
         }
 
-        if (!hasReadDeviceId) {
+        if (!EYuanCommInstaller.hasReadDeviceId) {
             Logger.e("还未完成deviceId加载,将延迟初始化")
             showInitLoadingDialog(activity)
             Thread {
-                while (!hasReadDeviceId) {
+                while (!EYuanCommInstaller.hasReadDeviceId) {
                     try {
-                        Logger.e("还未完成deviceId加载,延迟1s初始化,$hasReadDeviceId")
+                        Logger.e("还未完成deviceId加载,延迟1s初始化,$EYuanCommInstaller.hasReadDeviceId")
                         Thread.sleep(1000)
                         timeCount.getAndIncrement()
                     } catch (e: InterruptedException) {
@@ -146,7 +143,7 @@ class CommSdkImpl(context: Context) {
                     }
                 }
                 activity.runOnUiThread {
-                    if (hasReadDeviceId) {
+                    if (EYuanCommInstaller.hasReadDeviceId) {
                         Logger.i("加载deviceI完成,共延迟${timeCount}s初始化,将进行初始化操作...")
                         startSdkInit(activity, isLandscape, callback)
                     }
@@ -177,7 +174,6 @@ class CommSdkImpl(context: Context) {
     }
 
     private fun startInitCommSdk(activity: Activity, callback: ICallback) {
-        Logger.d("融合Sdk初始化...")
         SdkRequest.instance.initSdk(activity, "") { resultInfo ->
             hasSdkInit = resultInfo.code == 1
             initLoadingDialog?.apply {
@@ -503,7 +499,7 @@ class CommSdkImpl(context: Context) {
 //            return
 //        }
 //
-//        SdkProxyManager.call(Function.LINKING_EVENT, arrayOf(Context::class.java, SdkEvent::class.java), arrayOf(context, sdkEvent))
+//        SdkProxyManager.call(Function.LINKING_EVENT, arrayOf(Context::class.kotlin, SdkEvent::class.kotlin), arrayOf(context, sdkEvent))
 //    }
 //
 //    fun share(activity: Activity, line: String, tag: String, quote: String, callback: ICallback) {
@@ -515,7 +511,7 @@ class CommSdkImpl(context: Context) {
 //        }
 //
 //        SdkProxyManager.call(
-//            Function.SHARE, arrayOf(Activity::class.java, String::class.java, String::class.java, String::class.java, ICallback::class.java),
+//            Function.SHARE, arrayOf(Activity::class.kotlin, String::class.kotlin, String::class.kotlin, String::class.kotlin, ICallback::class.kotlin),
 //            arrayOf(activity, line, tag, quote, callback)
 //        )
 //    }

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/impl/SdkProxyManager.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/impl/SdkProxyManager.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/ICallback.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/ICallback.kt


+ 32 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/ITrace.kt

@@ -0,0 +1,32 @@
+package cn.yyxx.eyuancomm.comm.internal
+
+import android.app.Activity
+import android.app.Application
+import android.content.Context
+import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
+import cn.yyxx.eyuancomm.comm.entity.SdkEvent
+
+/**
+ * @author #Suyghur.
+ * Created on 2022/03/08
+ */
+interface ITrace {
+
+    fun onInitialize(application: Application)
+
+    fun onLogin(context: Context)
+
+    fun onRegister(context: Context)
+
+    fun onCharge(context: Context, chargeInfo: SdkChargeInfo)
+
+    fun onCreate(activity: Activity)
+
+    fun onResume(activity: Activity)
+
+    fun onPause(activity: Activity)
+
+    fun onSdkEvent(context: Context, sdkEvent: SdkEvent)
+
+    fun onExtEvent(context: Context, sdkEvent: SdkEvent)
+}

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/IApplication.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IApplication.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/IFeature.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IFeature.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/IFloatBall.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IFloatBall.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/ILifeCycle.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/ILifeCycle.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/IOrder.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IOrder.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/internal/feature/IRoleData.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/internal/feature/IRoleData.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/network/Host.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/Host.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/network/SdkRequest.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/SdkRequest.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/network/VolleyRequest.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/network/VolleyRequest.kt


+ 20 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/TraceEventManager.kt

@@ -0,0 +1,20 @@
+package cn.yyxx.eyuancomm.comm.trace
+
+import org.json.JSONObject
+
+/**
+ * @author #Suyghur.
+ * Created on 2022/03/08
+ */
+class TraceEventManager private constructor() {
+
+
+
+    companion object {
+        val instance: TraceEventManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
+            TraceEventManager()
+        }
+    }
+
+
+}

+ 118 - 0
library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/trace/channel/AdjustEventTrace.kt

@@ -0,0 +1,118 @@
+package cn.yyxx.eyuancomm.comm.trace.channel
+
+import android.app.Activity
+import android.app.Application
+import android.content.Context
+import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.entity.SdkChargeInfo
+import cn.yyxx.eyuancomm.comm.entity.SdkEvent
+import cn.yyxx.eyuancomm.comm.internal.ITrace
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.ParamsUtils
+import cn.yyxx.support.JsonUtils
+import cn.yyxx.support.hawkeye.LogUtils
+import com.adjust.sdk.Adjust
+import com.adjust.sdk.AdjustConfig
+import com.adjust.sdk.AdjustEvent
+import com.adjust.sdk.LogLevel
+import org.json.JSONObject
+import java.io.BufferedReader
+import java.io.InputStreamReader
+
+/**
+ * @author #Suyghur.
+ * Created on 2022/03/08
+ */
+class AdjustEventTrace(private val onIdRead: (String) -> Unit) : ITrace {
+
+    private var isInitSuccess = false
+    private var sdkConfig: JSONObject? = null
+    private var extConfig: JSONObject? = null
+
+    override fun onInitialize(application: Application) {
+//        this.sdkConfig = getSdkLogJson(application)
+//        this.extConfig = getExtLogJson(application)
+//
+//        if (sdkConfig == null) {
+//            Logger.e("adjust log 初始化失败,读取sdk_log.json异常")
+//            return
+//        }
+//
+//        val appId = ParamsUtils.getAdjustAppId(application)
+//        if (TextUtils.isEmpty(appId)) {
+//            Logger.e("adjust log 初始化失败,app id为空")
+//            isInitSuccess = false
+//            return
+//        }
+//
+//        val environment = if (LogUtils.DEBUG) {
+//            AdjustConfig.ENVIRONMENT_SANDBOX
+//        } else {
+//            AdjustConfig.ENVIRONMENT_PRODUCTION
+//        }
+//
+//        val config = AdjustConfig(application, appId, environment, true)
+//        config.setLogLevel(LogLevel.VERBOSE)
+//        config.setOnAttributionChangedListener {
+//            onIdRead(it.adid)
+//        }
+//        Adjust.onCreate(config)
+//        if (MMKVUtils.instance.eventKV.decodeBool("adjust_activities")) {
+//            isInitSuccess = true
+//            return
+//        }
+//        sdkConfig?.apply {
+//            if (JsonUtils.hasJsonKey(this, "open_app")) {
+//                Adjust.trackEvent(AdjustEvent(this.getString("open_app")))
+//                Logger.d("adjust log open app success")
+//                MMKVUtils.instance.eventKV.encode("adjust_activities", true)
+//                isInitSuccess = true
+//            }
+//        }
+    }
+
+    override fun onLogin(context: Context) {
+    }
+
+    override fun onRegister(context: Context) {
+    }
+
+    override fun onCharge(context: Context, chargeInfo: SdkChargeInfo) {
+    }
+
+    override fun onCreate(activity: Activity) {
+    }
+
+    override fun onResume(activity: Activity) {
+    }
+
+    override fun onPause(activity: Activity) {
+    }
+
+    override fun onSdkEvent(context: Context, sdkEvent: SdkEvent) {
+    }
+
+    override fun onExtEvent(context: Context, sdkEvent: SdkEvent) {
+    }
+
+    private fun getExtLogJson(context: Context): JSONObject? {
+        val path = "yyxx_game/ext_log.json"
+        val sb = StringBuilder()
+        try {
+            val assetManager = context.assets
+            BufferedReader(InputStreamReader(assetManager.open(path))).use {
+                var line = ""
+                while (true) {
+                    line = it.readLine() ?: break
+                    sb.append(line)
+                }
+            }
+            if (!TextUtils.isEmpty(sb.toString())) {
+                return JSONObject(sb.toString())
+            }
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+        return null
+    }
+}

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/utils/Logger.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/Logger.kt


+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/MMKVUtils.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/MMKVUtils.kt

@@ -1,4 +1,4 @@
-package cn.yyxx.eyuangame.utils
+package cn.yyxx.eyuancomm.comm.utils
 
 import android.content.Context
 import com.tencent.mmkv.MMKV

+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/utils/ParamsUtils.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/utils/ParamsUtils.kt


+ 0 - 0
library_comm/src/main/java/cn/yyxx/eyuancomm/comm/widget/ScaleLoadingDialog.kt → library_comm/src/main/kotlin/cn/yyxx/eyuancomm/comm/widget/ScaleLoadingDialog.kt


+ 1 - 6
module_eyuan/library_eyuan/build.gradle

@@ -61,12 +61,6 @@ dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
 
-    //mmkv
-    implementation 'com.tencent:mmkv-static:1.2.10'
-
-    //日志采集框架
-    implementation 'io.github.suyghur.dolin:zap:1.0.0'
-
     implementation 'androidx.core:core-ktx:1.7.0'
     implementation 'androidx.fragment:fragment-ktx:1.4.1'
     implementation "androidx.viewpager2:viewpager2:1.0.0"
@@ -88,6 +82,7 @@ dependencies {
 
     compileOnly files('../../libs/yyxx_support_1.0.2.jar')
     compileOnly project(':module_eyuan:library_hk_language')
+    compileOnly project(':library_comm')
 }
 
 apply from: 'publish.gradle'

+ 4 - 4
module_eyuan/library_eyuan/src/main/cpp/logger.cpp

@@ -8,7 +8,7 @@ bool Logger::is_debug = true;
 
 void Logger::D(JNIEnv *env, const std::string &msg) {
     if (is_debug) {
-        jclass clz = env->FindClass("cn/yyxx/eyuangame/utils/Logger");
+        jclass clz = env->FindClass("cn/yyxx/eyuancomm/comm/utils/Logger");
         if (clz == nullptr) {
             LOGE("Logger clz is null");
             return;
@@ -23,7 +23,7 @@ void Logger::D(JNIEnv *env, const std::string &msg) {
 }
 
 void Logger::I(JNIEnv *env, const std::string &msg) {
-    jclass clz = env->FindClass("cn/yyxx/eyuangame/utils/Logger");
+    jclass clz = env->FindClass("cn/yyxx/eyuancomm/comm/utils/Logger");
     if (clz == nullptr) {
         LOGE("Logger clz is null");
         return;
@@ -37,7 +37,7 @@ void Logger::I(JNIEnv *env, const std::string &msg) {
 }
 
 void Logger::E(JNIEnv *env, const std::string &msg) {
-    jclass clz = env->FindClass("cn/yyxx/eyuangame/utils/Logger");
+    jclass clz = env->FindClass("cn/yyxx/eyuancomm/comm/utils/Logger");
     if (clz == nullptr) {
         LOGE("Logger clz is null");
         return;
@@ -52,7 +52,7 @@ void Logger::E(JNIEnv *env, const std::string &msg) {
 }
 
 void Logger::LogHandler(JNIEnv *env, const std::string &msg) {
-    jclass clz = env->FindClass("cn/yyxx/eyuangame/utils/Logger");
+    jclass clz = env->FindClass("cn/yyxx/eyuancomm/comm/utils/Logger");
     if (clz == nullptr) {
         LOGE("Logger clz is null");
         return;

+ 0 - 94
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/Logger.kt

@@ -1,94 +0,0 @@
-package cn.yyxx.eyuangame.utils
-
-import android.app.Application
-import cn.yyxx.support.hawkeye.LogUtils
-import cn.yyxx.support.hawkeye.OwnDebugUtils
-import com.dolin.zap.Zap
-import com.dolin.zap.entity.Config
-import com.dolin.zap.entity.Level
-
-/**
- * @author #Suyghur.
- * Created on 2020/11/30
- */
-object Logger {
-
-    private const val TAG: String = "eyuangame_sdk"
-
-    private var hasZapInit = false
-
-    @JvmStatic
-    fun initZap(application: Application) {
-        LogUtils.DEBUG = OwnDebugUtils.isOwnDebug(application, "yyxx_cfg.properties", "yyxx_game", "YYXX_OWN_DEBUG")
-        val level = if (LogUtils.DEBUG) {
-            Level.DEBUG
-        } else {
-            Level.INFO
-        }
-
-        //初始化Zap日志框架
-        val config = Config.Builder()
-            //logcat输出最低等级
-            .setLogcatLevel(level)
-            //是否开启缓存日志
-            .setRecordEnable(true)
-            //缓存日志最低等级
-            .setRecordLevel(Level.DEBUG)
-            //是否开启压缩缓存日志内容
-            .setCompressEnable(true)
-            //缓存文件的过期时间
-            .setOverdueDay(3)
-            //缓存文件大小限制,超过则会自动扩容新文件
-            .setFileSizeLimitDay(10)
-            .create()
-        Zap.initialize(application, config)
-        hasZapInit = true
-    }
-
-    @JvmStatic
-    fun d(any: Any?) {
-        d(TAG, any)
-    }
-
-    @JvmStatic
-    fun d(tag: String, any: Any?) {
-        if (hasZapInit) {
-            Zap.d(tag, any)
-        } else {
-            LogUtils.d(tag, any)
-        }
-    }
-
-    @JvmStatic
-    fun i(any: Any?) {
-        i(TAG, any)
-    }
-
-    @JvmStatic
-    fun i(tag: String, any: Any?) {
-        if (hasZapInit) {
-            Zap.i(tag, any)
-        } else {
-            LogUtils.i(tag, any)
-        }
-    }
-
-    @JvmStatic
-    fun e(any: Any?) {
-        d(TAG, any)
-    }
-
-    @JvmStatic
-    fun e(tag: String, any: Any?) {
-        if (hasZapInit) {
-            Zap.e(tag, any)
-        } else {
-            LogUtils.e(tag, any)
-        }
-    }
-
-    @JvmStatic
-    fun logHandler(msg: String) {
-        LogUtils.logHandler(msg)
-    }
-}

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/EYuanGameSdk.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/EYuanGameSdk.kt

@@ -7,12 +7,12 @@ import android.content.Intent
 import android.os.Build
 import android.text.TextUtils
 import android.webkit.WebView
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.entity.SdkEvent
 import cn.yyxx.eyuangame.entity.SdkRoleInfo
 import cn.yyxx.eyuangame.impl.GameSdkImpl
 import cn.yyxx.eyuangame.internal.ICallback
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.support.AppUtils
 
 /**

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/Version.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/Version.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/ClickType.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/ClickType.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/FloatFeature.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/FloatFeature.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/LoginType.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/LoginType.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/ResultInfo.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/ResultInfo.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/SdkBackLoginInfo.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkBackLoginInfo.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/SdkChargeInfo.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkChargeInfo.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/SdkEvent.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkEvent.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/SdkRoleInfo.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/SdkRoleInfo.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/Session.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/Session.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/bean/init/FloatCfg.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/bean/init/FloatCfg.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/entity/bean/init/InitBean.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/entity/bean/init/InitBean.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/ext/CountDownTimerExt.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/CountDownTimerExt.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/ext/StringFilterExt.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/StringFilterExt.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/ext/ViewExt.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/ViewExt.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/ext/ZipExt.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/ext/ZipExt.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/GameSdkDrive.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/GameSdkDrive.kt


+ 50 - 53
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/GameSdkImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/GameSdkImpl.kt

@@ -6,6 +6,8 @@ import android.app.Application
 import android.content.Context
 import android.content.Intent
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.entity.SdkEvent
@@ -19,16 +21,13 @@ import cn.yyxx.eyuangame.impl.share.ShareImpl
 import cn.yyxx.eyuangame.network.Host
 import cn.yyxx.eyuangame.network.SdkRequest
 import cn.yyxx.eyuangame.trace.TraceEventManager
+import cn.yyxx.eyuangame.utils.ParamsUtils
 import cn.yyxx.eyuangame.widget.dialog.ScaleLoadingDialog
 import cn.yyxx.eyuangame.widget.dialog.TipsDialog
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.utils.MMKVUtils
-import cn.yyxx.eyuangame.utils.ParamsUtils
 import cn.yyxx.support.BeanUtils
 import cn.yyxx.support.DensityUtils
 import cn.yyxx.support.ResUtils
 import cn.yyxx.support.device.DeviceInfoUtils
-import cn.yyxx.support.gaid.GAIDUtils
 import com.google.firebase.crashlytics.FirebaseCrashlytics
 import java.util.concurrent.atomic.AtomicInteger
 
@@ -39,46 +38,43 @@ import java.util.concurrent.atomic.AtomicInteger
  */
 class GameSdkImpl {
 
-    private var hasReadGaid = false
+//    private var hasReadGaid = false
 
     private var initState = false
 
     private var isSubmitRoleData = false
 
-    @Volatile
-    private var timeCount = AtomicInteger(0)
+//    @Volatile
+//    private var timeCount = AtomicInteger(0)
 
     private var exitDialog: TipsDialog? = null
 
     private var initLoadingDialog: ScaleLoadingDialog? = null
 
     fun attachBaseContext(application: Application, context: Context) {
-        Logger.initZap(application)
         GameSdkDrive.instance.initSdkDrive(application)
-        Logger.i("EYuanGameSdk attachBaseContext ...")
-        GAIDUtils.initGoogleAdid(application) { code, _ ->
-            if (code == 0) {
-                if (GAIDUtils.getGoogleAdid() == "00000000-0000-0000-0000-000000000000") {
-                    Logger.i("谷歌框架可以访问,gaid被限制跟踪,使用android id替代")
-                    GameSdkDrive.instance.setParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
-                    FirebaseCrashlytics.getInstance().setCustomKey("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
-                } else {
-                    Logger.i("谷歌框架可以访问,请求gaid")
-                    GameSdkDrive.instance.setParam("device_id", GAIDUtils.getGoogleAdid())
-                    FirebaseCrashlytics.getInstance().setCustomKey("device_id", GAIDUtils.getGoogleAdid())
-                }
-            } else {
-                Logger.e("谷歌框架不可访问,使用android id替代")
-                GameSdkDrive.instance.setParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
-                FirebaseCrashlytics.getInstance().setCustomKey("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
-            }
-            hasReadGaid = true
-        }
+//        GAIDUtils.initGoogleAdid(application) { code, _ ->
+//            if (code == 0) {
+//                if (GAIDUtils.getGoogleAdid() == "00000000-0000-0000-0000-000000000000") {
+//                    Logger.i("谷歌框架可以访问,gaid被限制跟踪,使用android id替代")
+//                    GameSdkDrive.instance.setParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+//                    FirebaseCrashlytics.getInstance().setCustomKey("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+//                } else {
+//                    Logger.i("谷歌框架可以访问,请求gaid")
+//                    GameSdkDrive.instance.setParam("device_id", GAIDUtils.getGoogleAdid())
+//                    FirebaseCrashlytics.getInstance().setCustomKey("device_id", GAIDUtils.getGoogleAdid())
+//                }
+//            } else {
+//                Logger.e("谷歌框架不可访问,使用android id替代")
+//                GameSdkDrive.instance.setParam("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+//                FirebaseCrashlytics.getInstance().setCustomKey("device_id", DeviceInfoUtils.getAndroidDeviceId(application))
+//            }
+//            hasReadGaid = true
+//        }
     }
 
     fun initApplication(application: Application) {
         Logger.i("EYuanGameSdk initApplication ...")
-        MMKVUtils.instance.init(application)
         Host.initHostModel(application)
         TraceEventManager.instance.initialize(application, object : TraceEventManager.OnTraceIdRead {
             override fun onAdjustIdRead(id: String) {
@@ -121,31 +117,32 @@ class GameSdkImpl {
         }
 
         showInitLoadingDialog(activity)
-        if (!hasReadGaid) {
-            Logger.e("还未完成gaid加载,将延迟初始化")
-            Thread {
-                while (!hasReadGaid) {
-                    try {
-                        Logger.e("还未完成gaid加载,延迟1s初始化,$hasReadGaid")
-                        Thread.sleep(1000)
-                        timeCount.getAndIncrement()
-                    } catch (e: InterruptedException) {
-                        e.printStackTrace()
-                    }
-                }
-                activity.runOnUiThread {
-                    if (TextUtils.isEmpty(GAIDUtils.getGoogleAdid())) {
-                        Logger.e("加载gaid失败,共延迟${timeCount}s初始化,将进行初始化操作...")
-                    } else {
-                        Logger.i("加载gaid成功,共延迟${timeCount}s初始化,将进行初始化操作...")
-                    }
-                    startSdkInit(activity, callback)
-                }
-            }.start()
-        } else {
-            Logger.i("加载gaid成功,开始初始化...")
-            startSdkInit(activity, callback)
-        }
+//        if (!hasReadGaid) {
+//            Logger.e("还未完成gaid加载,将延迟初始化")
+//            Thread {
+//                while (!hasReadGaid) {
+//                    try {
+//                        Logger.e("还未完成gaid加载,延迟1s初始化,$hasReadGaid")
+//                        Thread.sleep(1000)
+//                        timeCount.getAndIncrement()
+//                    } catch (e: InterruptedException) {
+//                        e.printStackTrace()
+//                    }
+//                }
+//                activity.runOnUiThread {
+//                    if (TextUtils.isEmpty(GAIDUtils.getGoogleAdid())) {
+//                        Logger.e("加载gaid失败,共延迟${timeCount}s初始化,将进行初始化操作...")
+//                    } else {
+//                        Logger.i("加载gaid成功,共延迟${timeCount}s初始化,将进行初始化操作...")
+//                    }
+//                    startSdkInit(activity, callback)
+//                }
+//            }.start()
+//        } else {
+//            Logger.i("加载gaid成功,开始初始化...")
+//            startSdkInit(activity, callback)
+//        }
+        startSdkInit(activity, callback)
     }
 
     private fun startSdkInit(activity: Activity, callback: (Int, String) -> Unit) {

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/SdkJsImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/SdkJsImpl.kt

@@ -1,7 +1,7 @@
 package cn.yyxx.eyuangame.impl
 
 import android.webkit.JavascriptInterface
-import cn.yyxx.eyuangame.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.Logger
 
 /**
  * @author #Suyghur.

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/BindAccountContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindAccountContainer.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/BindEmailContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindEmailContainer.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/BindPhoneContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/BindPhoneContainer.kt


+ 1 - 2
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/HybridFeatureContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/HybridFeatureContainer.kt

@@ -13,6 +13,7 @@ import android.view.*
 import android.webkit.*
 import android.widget.FrameLayout
 import android.widget.ImageView
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.impl.GameSdkDrive
 import cn.yyxx.eyuangame.impl.GameSdkImpl
@@ -21,7 +22,6 @@ import cn.yyxx.eyuangame.impl.share.ShareImpl
 import cn.yyxx.eyuangame.network.Host
 import cn.yyxx.eyuangame.network.SdkRequest
 import cn.yyxx.eyuangame.widget.dialog.ScaleLoadingDialog
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.support.DensityUtils
 import cn.yyxx.support.JsonUtils
 import cn.yyxx.support.ResUtils
@@ -63,7 +63,6 @@ class HybridFeatureContainer(private val activity: Activity, private val url: St
                 "facebookShare" -> {
                     kotlin.runCatching {
                         val jsonObject = JSONObject(data)
-                        Logger.d(jsonObject.toString())
                         val line = if (JsonUtils.hasJsonKey(jsonObject, "line")) {
                             jsonObject.getString("line")
                         } else {

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/MemberCenterContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/MemberCenterContainer.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/center/ModifyPwdContainer.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/center/ModifyPwdContainer.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/floatball/FloatCenterService.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/floatball/FloatCenterService.kt


+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/floatball/FloatCenterServiceManager.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/floatball/FloatCenterServiceManager.kt

@@ -7,9 +7,9 @@ import android.content.Intent
 import android.content.ServiceConnection
 import android.os.IBinder
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.impl.GameSdkImpl
-import cn.yyxx.eyuangame.utils.Logger
 
 /**
  * @author #Suyghur.

+ 2 - 2
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/iab/ChargeImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/iab/ChargeImpl.kt

@@ -2,11 +2,11 @@ package cn.yyxx.eyuangame.impl.iab
 
 import android.app.Activity
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.impl.GameSdkImpl
 import cn.yyxx.eyuangame.network.SdkRequest
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.utils.MMKVUtils
 import cn.yyxx.support.ResUtils
 import cn.yyxx.support.hawkeye.ToastUtils
 import com.android.billingclient.api.*

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/iab/InAppBilling.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/iab/InAppBilling.kt

@@ -2,9 +2,9 @@ package cn.yyxx.eyuangame.impl.iab
 
 import android.app.Activity
 import android.content.Context
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.impl.GameSdkImpl
 import cn.yyxx.eyuangame.widget.dialog.ScaleLoadingDialog
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.support.ResUtils
 import com.android.billingclient.api.BillingClient
 import com.android.billingclient.api.BillingClientStateListener

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/login/LoginActivity.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/LoginActivity.kt

@@ -16,6 +16,7 @@ import androidx.fragment.app.FragmentActivity
 import androidx.lifecycle.lifecycleScope
 import androidx.viewpager2.adapter.FragmentStateAdapter
 import androidx.viewpager2.widget.ViewPager2
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.ClickType
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.SdkEvent
@@ -25,7 +26,6 @@ import cn.yyxx.eyuangame.impl.GameSdkImpl
 import cn.yyxx.eyuangame.impl.login.fragment.LauncherFragment
 import cn.yyxx.eyuangame.impl.login.fragment.RegisterFragment
 import cn.yyxx.eyuangame.trace.TraceEventManager
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.eyuangame.utils.SessionUtils
 import cn.yyxx.eyuangame.widget.dialog.AutoLoginDialog
 import cn.yyxx.eyuangame.widget.dialog.ChooseLoginDialog

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/login/LoginFragmentPagerAdapter.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/LoginFragmentPagerAdapter.kt


+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/login/UserSignInImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/UserSignInImpl.kt

@@ -4,12 +4,12 @@ import android.app.Activity
 import android.content.Context
 import android.content.Intent
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.entity.Session
 import cn.yyxx.eyuangame.network.SdkRequest
 import cn.yyxx.eyuangame.widget.dialog.ScaleLoadingDialog
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.eyuangame.utils.ParamsUtils
 import cn.yyxx.support.ResUtils
 import cn.yyxx.support.hawkeye.ToastUtils

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/login/fragment/LauncherFragment.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/fragment/LauncherFragment.kt

@@ -8,6 +8,7 @@ import android.text.TextUtils
 import android.view.*
 import android.widget.*
 import androidx.fragment.app.Fragment
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.ClickType
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.Session
@@ -17,7 +18,6 @@ import cn.yyxx.eyuangame.ext.filterPwd
 import cn.yyxx.eyuangame.impl.GameSdkImpl
 import cn.yyxx.eyuangame.impl.login.LoginActivity
 import cn.yyxx.eyuangame.network.SdkRequest
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.eyuangame.utils.SessionUtils
 import cn.yyxx.eyuangame.widget.EventEditText
 import cn.yyxx.eyuangame.widget.dialog.AgreementDialog

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/login/fragment/RegisterFragment.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/login/fragment/RegisterFragment.kt


+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/impl/share/ShareImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/impl/share/ShareImpl.kt

@@ -3,7 +3,7 @@ package cn.yyxx.eyuangame.impl.share
 import android.app.Activity
 import android.content.Intent
 import android.net.Uri
-import cn.yyxx.eyuangame.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import com.facebook.CallbackManager
 import com.facebook.FacebookCallback
 import com.facebook.FacebookException

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/internal/ICallback.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/ICallback.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/internal/IFileRequestCallback.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/IFileRequestCallback.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/internal/ITrace.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/internal/ITrace.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/network/Host.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/Host.kt


+ 4 - 4
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/network/SdkRequest.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/SdkRequest.kt

@@ -1,15 +1,15 @@
 package cn.yyxx.eyuangame.network
 
 import android.content.Context
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuangame.entity.*
 import cn.yyxx.eyuangame.ext.zipAll
 import cn.yyxx.eyuangame.internal.IFileRequestCallback
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.entity.*
 import cn.yyxx.eyuangame.utils.ParamsUtils
 import cn.yyxx.support.encryption.Md5Utils
 import cn.yyxx.support.volley.source.VolleyError
+import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.launch
 import org.json.JSONException
 import org.json.JSONObject
@@ -203,7 +203,7 @@ class SdkRequest {
     fun uploadLogFile(context: Context, userClick: Boolean, callback: (ResultInfo) -> Unit) {
         val zapFolderPath = context.getExternalFilesDir("dolin/zap")!!.absolutePath
         val dolinFolderPath = context.getExternalFilesDir("dolin")!!.absolutePath
-        GlobalScope.launch(Dispatchers.IO) {
+        CoroutineScope(Dispatchers.IO).launch {
             File(zapFolderPath).zipAll("$dolinFolderPath/upload_file.zip")
             val file = File("$dolinFolderPath/upload_file.zip")
             val md5 = Md5Utils.getFileMD5(file)

+ 1 - 1
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/network/VolleyRequest.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/network/VolleyRequest.kt

@@ -2,10 +2,10 @@ package cn.yyxx.eyuangame.network
 
 import android.content.Context
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
 import cn.yyxx.eyuangame.entity.ResultInfo
 import cn.yyxx.eyuangame.impl.GameSdkDrive
 import cn.yyxx.eyuangame.internal.IFileRequestCallback
-import cn.yyxx.eyuangame.utils.Logger
 import cn.yyxx.support.FileUtils
 import cn.yyxx.support.JsonUtils
 import cn.yyxx.support.ResUtils

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/trace/TraceEventManager.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/TraceEventManager.kt


+ 2 - 2
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/trace/channel/TraceAdjustImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceAdjustImpl.kt

@@ -4,13 +4,13 @@ import android.app.Activity
 import android.app.Application
 import android.content.Context
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.entity.SdkEvent
 import cn.yyxx.eyuangame.internal.ITrace
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.utils.MMKVUtils
 import cn.yyxx.eyuangame.utils.ParamsUtils
 import cn.yyxx.support.JsonUtils
 import cn.yyxx.support.hawkeye.LogUtils

+ 2 - 2
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/trace/channel/TraceFacebookImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceFacebookImpl.kt

@@ -5,13 +5,13 @@ import android.app.Application
 import android.content.Context
 import android.os.Bundle
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.entity.SdkEvent
 import cn.yyxx.eyuangame.internal.ITrace
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.utils.MMKVUtils
 import com.facebook.FacebookSdk
 import com.facebook.LoggingBehavior
 import com.facebook.appevents.AppEventsConstants

+ 2 - 2
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/trace/channel/TraceFirebaseImpl.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/trace/channel/TraceFirebaseImpl.kt

@@ -4,13 +4,13 @@ import android.app.Activity
 import android.app.Application
 import android.content.Context
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.SdkBackLoginInfo
 import cn.yyxx.eyuangame.entity.SdkChargeInfo
 import cn.yyxx.eyuangame.entity.SdkEvent
 import cn.yyxx.eyuangame.internal.ITrace
-import cn.yyxx.eyuangame.utils.Logger
-import cn.yyxx.eyuangame.utils.MMKVUtils
 import com.google.firebase.analytics.FirebaseAnalytics
 import com.google.firebase.analytics.ktx.analytics
 import com.google.firebase.analytics.ktx.logEvent

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/LocalCacheUtils.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/LocalCacheUtils.kt


+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/ParamsUtils.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/ParamsUtils.kt


+ 2 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/utils/SessionUtils.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/utils/SessionUtils.kt

@@ -1,6 +1,8 @@
 package cn.yyxx.eyuangame.utils
 
 import android.text.TextUtils
+import cn.yyxx.eyuancomm.comm.utils.Logger
+import cn.yyxx.eyuancomm.comm.utils.MMKVUtils
 import cn.yyxx.eyuangame.entity.LoginType
 import cn.yyxx.eyuangame.entity.Session
 import cn.yyxx.eyuangame.network.Host

+ 0 - 0
module_eyuan/library_eyuan/src/main/java/cn/yyxx/eyuangame/widget/EventEditText.kt → module_eyuan/library_eyuan/src/main/kotlin/cn/yyxx/eyuangame/widget/EventEditText.kt


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio