소스 검색

feature:修改项目包名

#Suyghur 4 년 전
부모
커밋
08ce292ab6
28개의 변경된 파일73개의 추가작업 그리고 69개의 파일을 삭제
  1. 3 1
      demo/build.gradle
  2. 3 3
      demo/src/main/AndroidManifest.xml
  3. 16 16
      demo/src/main/java/com/dolin/demo/DemoActivity.kt
  4. 4 4
      demo/src/main/java/com/dolin/demo/DemoApplication.kt
  5. 3 0
      demo/src/main/java/com/dolin/demo/Item.kt
  6. 2 2
      demo/src/main/java/com/dolin/demo/ZapActivity.kt
  7. 0 3
      demo/src/main/java/com/suyghur/dolin/Item.kt
  8. 1 1
      library_common/src/main/java/com/dolin/common/Common.kt
  9. 1 1
      library_common/src/main/java/com/dolin/common/util/CrashUtils.kt
  10. 1 1
      library_common/src/main/java/com/dolin/common/util/DeviceInfoUtils.kt
  11. 1 1
      library_common/src/main/java/com/dolin/common/util/FileUtils.kt
  12. 1 1
      library_zap/src/main/AndroidManifest.xml
  13. 6 4
      library_zap/src/main/cpp/zap.cpp
  14. 1 1
      library_zap/src/main/java/com/dolin/zap/Version.kt
  15. 3 3
      library_zap/src/main/java/com/dolin/zap/Zap.kt
  16. 1 1
      library_zap/src/main/java/com/dolin/zap/crashlytics/JavaCrashCatcher.kt
  17. 1 1
      library_zap/src/main/java/com/dolin/zap/entity/Config.kt
  18. 1 1
      library_zap/src/main/java/com/dolin/zap/entity/Level.kt
  19. 1 1
      library_zap/src/main/java/com/dolin/zap/entity/ZapData.kt
  20. 4 4
      library_zap/src/main/java/com/dolin/zap/format/DateFileFormatter.kt
  21. 2 2
      library_zap/src/main/java/com/dolin/zap/impl/Record2MMap.kt
  22. 8 8
      library_zap/src/main/java/com/dolin/zap/impl/ZapPrint.kt
  23. 1 1
      library_zap/src/main/java/com/dolin/zap/internal/ICatch.kt
  24. 2 2
      library_zap/src/main/java/com/dolin/zap/internal/IFormatter.kt
  25. 1 1
      library_zap/src/main/java/com/dolin/zap/internal/IPrint.kt
  26. 1 1
      library_zap/src/main/java/com/dolin/zap/internal/IRecord.kt
  27. 2 2
      library_zap/src/main/java/com/dolin/zap/lifecycle/ZapLifecycle.kt
  28. 2 2
      library_zap/src/main/java/com/dolin/zap/util/LevelUtils.kt

+ 3 - 1
demo/build.gradle

@@ -12,7 +12,7 @@ android {
     buildToolsVersion BUILD_TOOLS_VERSION
 
     defaultConfig {
-        applicationId "com.suyghur.dolin"
+        applicationId "com.dolin.demo"
         minSdkVersion MIN_SDK_VERSION
         targetSdkVersion TARGET_SDK_VERSION
         versionCode 1
@@ -24,6 +24,8 @@ android {
         }
     }
 
+    ndkVersion NDK_VERSION
+
     signingConfigs {
         config {
             keyAlias keystoreProperties['keyAlias']

+ 3 - 3
demo/src/main/AndroidManifest.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.suyghur.dolin">
+    package="com.dolin.demo">
 
     <application
-        android:name=".DemoApplication"
+        android:name="com.dolin.demo.DemoApplication"
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
@@ -22,7 +22,7 @@
         </activity>
 
         <activity
-            android:name="com.suyghur.dolin.ZapActivity"
+            android:name=".ZapActivity"
             android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
             android:exported="true"
             android:launchMode="singleTask"

+ 16 - 16
demo/src/main/java/com/suyghur/dolin/DemoActivity.kt → demo/src/main/java/com/dolin/demo/DemoActivity.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin
+package com.dolin.demo
 
 import android.app.Activity
 import android.app.AlertDialog
@@ -8,7 +8,8 @@ import android.view.View
 import android.widget.Button
 import android.widget.LinearLayout
 import android.widget.TextView
-import com.suyghur.dolin.zap.Zap
+import com.dolin.common.util.DeviceInfoUtils
+import com.dolin.zap.Zap
 import kotlin.system.exitProcess
 
 /**
@@ -28,8 +29,7 @@ class DemoActivity : Activity(), View.OnClickListener {
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         initView()
-//        initDeviceInfo()
-//        Zap.d("test : ${Common.testLib()}")
+        initDeviceInfo()
     }
 
     private fun initView() {
@@ -48,18 +48,18 @@ class DemoActivity : Activity(), View.OnClickListener {
         setContentView(layout)
     }
 
-//    private fun initDeviceInfo() {
-//        val sb = StringBuilder()
-//        sb.append("Android ID:").append(DeviceInfoUtils.getAndroidDeviceId(this)).append("\n")
-//        sb.append("厂商:").append(DeviceInfoUtils.getDeviceBrand()).append("\n")
-//        sb.append("型号:").append(DeviceInfoUtils.getModel()).append("\n")
-//        sb.append("系统版本:").append(DeviceInfoUtils.getDeviceSoftWareVersion()).append("\n")
-//        sb.append("cpu核数:").append(DeviceInfoUtils.getCpuCount()).append("\n")
-//        sb.append("cpu架构:").append(DeviceInfoUtils.getCpuABI()).append("\n")
-//        sb.append("本机内存:").append(DeviceInfoUtils.getRAM()).append("\n")
-//        sb.append("本机剩余内存:").append(DeviceInfoUtils.getAvailMem(this)).append("M")
-//        textView.text = sb.toString()
-//    }
+    private fun initDeviceInfo() {
+        val sb = StringBuilder()
+        sb.append("Android ID:").append(DeviceInfoUtils.getAndroidDeviceId(this)).append("\n")
+        sb.append("厂商:").append(DeviceInfoUtils.getDeviceBrand()).append("\n")
+        sb.append("型号:").append(DeviceInfoUtils.getModel()).append("\n")
+        sb.append("系统版本:").append(DeviceInfoUtils.getDeviceSoftWareVersion()).append("\n")
+        sb.append("cpu核数:").append(DeviceInfoUtils.getCpuCount()).append("\n")
+        sb.append("cpu架构:").append(DeviceInfoUtils.getCpuABI()).append("\n")
+        sb.append("本机内存:").append(DeviceInfoUtils.getRAM()).append("\n")
+        sb.append("本机剩余内存:").append(DeviceInfoUtils.getAvailMem(this)).append("M")
+        textView.text = sb.toString()
+    }
 
     override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
         if (keyCode == KeyEvent.KEYCODE_BACK) {

+ 4 - 4
demo/src/main/java/com/suyghur/dolin/DemoApplication.kt → demo/src/main/java/com/dolin/demo/DemoApplication.kt

@@ -1,10 +1,10 @@
-package com.suyghur.dolin
+package com.dolin.demo
 
 import android.app.Application
 import android.content.Context
-import com.suyghur.dolin.zap.entity.Config
-import com.suyghur.dolin.zap.entity.Level
-import com.suyghur.dolin.zap.Zap
+import com.dolin.zap.entity.Config
+import com.dolin.zap.entity.Level
+import com.dolin.zap.Zap
 
 /**
  * @author #Suyghur.

+ 3 - 0
demo/src/main/java/com/dolin/demo/Item.kt

@@ -0,0 +1,3 @@
+package com.dolin.demo
+
+class Item constructor(val id: Int, val text: String)

+ 2 - 2
demo/src/main/java/com/suyghur/dolin/ZapActivity.kt → demo/src/main/java/com/dolin/demo/ZapActivity.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin
+package com.dolin.demo
 
 import android.app.Activity
 import android.content.Intent
@@ -6,7 +6,7 @@ import android.os.Bundle
 import android.view.View
 import android.widget.Button
 import android.widget.LinearLayout
-import com.suyghur.dolin.zap.Zap
+import com.dolin.zap.Zap
 
 /**
  * @author #Suyghur.

+ 0 - 3
demo/src/main/java/com/suyghur/dolin/Item.kt

@@ -1,3 +0,0 @@
-package com.suyghur.dolin
-
-class Item constructor(val id: Int, val text: String)

+ 1 - 1
library_common/src/main/java/com/suyghur/dolin/common/Common.kt → library_common/src/main/java/com/dolin/common/Common.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.common
+package com.dolin.common
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_common/src/main/java/com/suyghur/dolin/common/util/CrashUtils.kt → library_common/src/main/java/com/dolin/common/util/CrashUtils.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.common.util
+package com.dolin.common.util
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_common/src/main/java/com/suyghur/dolin/common/util/DeviceInfoUtils.kt → library_common/src/main/java/com/dolin/common/util/DeviceInfoUtils.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.common.util
+package com.dolin.common.util
 
 import android.app.ActivityManager
 import android.content.Context

+ 1 - 1
library_common/src/main/java/com/suyghur/dolin/common/util/FileUtils.kt → library_common/src/main/java/com/dolin/common/util/FileUtils.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.common.util
+package com.dolin.common.util
 
 import android.content.Context
 import java.io.File

+ 1 - 1
library_zap/src/main/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.suyghur.zege.log">
+    package="com.dolin.zap">
 
 </manifest>

+ 6 - 4
library_zap/src/main/cpp/zap.cpp

@@ -19,7 +19,8 @@ static void WriteDirty2File(int buffer_fd) {
         auto buffer_size = static_cast<size_t>(file_stat.st_size);
         //buffer size必须大于文件头长度,否则下标溢出
         if (buffer_size > zap::BufferHeader::CalculateHeaderLen(0)) {
-            char *buffer_ptr_tmp = (char *) mmap(0, buffer_size, PROT_WRITE | PROT_READ, MAP_SHARED, buffer_fd, 0);
+            char *buffer_ptr_tmp = (char *) mmap(0, buffer_size, PROT_WRITE | PROT_READ, MAP_SHARED,
+                                                 buffer_fd, 0);
             if (buffer_ptr_tmp != MAP_FAILED) {
                 auto *tmp = new Buffer(buffer_ptr_tmp, buffer_size);
                 size_t data_size = tmp->GetLength();
@@ -41,7 +42,8 @@ static char *OpenMMap(int buffer_fd, size_t buffer_size) {
         //根据buffer size 调整 buffer 大小
         ftruncate(buffer_fd, static_cast<int >(buffer_size));
         lseek(buffer_fd, 0, SEEK_SET);
-        map_ptr = (char *) mmap(nullptr, buffer_size, PROT_WRITE | PROT_READ, MAP_SHARED, buffer_fd, 0);
+        map_ptr = (char *) mmap(nullptr, buffer_size, PROT_WRITE | PROT_READ, MAP_SHARED, buffer_fd,
+                                0);
         if (map_ptr == MAP_FAILED) {
             map_ptr = nullptr;
         }
@@ -131,7 +133,7 @@ static JNINativeMethod gMethods[] = {
         {"asyncFlushNative",    "(J)V",                                      (void *) AsyncFlushNative},
         {"changeLogPathNative", "(JLjava/lang/String;)V",                    (void *) ChangeLogPathNative},
         {"releaseNative",       "(J)V",                                      (void *) ReleaseNative},
-        {"testCommonLib",             "(J)Ljava/lang/String;",                     (void *) TestCommonLib}
+        {"testCommonLib",       "(J)Ljava/lang/String;",                     (void *) TestCommonLib}
 };
 
 extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
@@ -139,7 +141,7 @@ extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
     if (vm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) {
         return JNI_ERR;
     }
-    jclass clz = env->FindClass("com/suyghur/dolin/zap/impl/Record2MMap");
+    jclass clz = env->FindClass("com/dolin/zap/impl/Record2MMap");
     if (env->RegisterNatives(clz, gMethods, sizeof(gMethods) / sizeof(gMethods[0])) < 0) {
         return JNI_ERR;
     }

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/Version.kt → library_zap/src/main/java/com/dolin/zap/Version.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap
+package com.dolin.zap
 
 /**
  * @author #Suyghur.

+ 3 - 3
library_zap/src/main/java/com/suyghur/dolin/zap/Zap.kt → library_zap/src/main/java/com/dolin/zap/Zap.kt

@@ -1,8 +1,8 @@
-package com.suyghur.dolin.zap
+package com.dolin.zap
 
 import android.app.Application
-import com.suyghur.dolin.zap.entity.Config
-import com.suyghur.dolin.zap.impl.ZapPrint
+import com.dolin.zap.entity.Config
+import com.dolin.zap.impl.ZapPrint
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/crashlytics/JavaCrashCatcher.kt → library_zap/src/main/java/com/dolin/zap/crashlytics/JavaCrashCatcher.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.crashlytics
+package com.dolin.zap.crashlytics
 
 import android.os.Process
 import com.suyghur.dolin.zap.Zap

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/entity/Config.kt → library_zap/src/main/java/com/dolin/zap/entity/Config.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.entity
+package com.dolin.zap.entity
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/entity/Level.kt → library_zap/src/main/java/com/dolin/zap/entity/Level.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.entity
+package com.dolin.zap.entity
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/entity/ZapData.kt → library_zap/src/main/java/com/dolin/zap/entity/ZapData.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.entity
+package com.dolin.zap.entity
 
 /**
  * 参考[android.os.Message]的享元模式

+ 4 - 4
library_zap/src/main/java/com/suyghur/dolin/zap/format/DateFileFormatter.kt → library_zap/src/main/java/com/dolin/zap/format/DateFileFormatter.kt

@@ -1,9 +1,9 @@
-package com.suyghur.dolin.zap.format
+package com.dolin.zap.format
 
 import android.text.TextUtils
-import com.suyghur.dolin.zap.entity.Level
-import com.suyghur.dolin.zap.internal.IFormatter
-import com.suyghur.dolin.zap.util.LevelUtils
+import com.dolin.zap.entity.Level
+import com.dolin.zap.internal.IFormatter
+import com.dolin.zap.util.LevelUtils
 import java.text.SimpleDateFormat
 import java.util.*
 

+ 2 - 2
library_zap/src/main/java/com/suyghur/dolin/zap/impl/Record2MMap.kt → library_zap/src/main/java/com/dolin/zap/impl/Record2MMap.kt

@@ -1,7 +1,7 @@
-package com.suyghur.dolin.zap.impl
+package com.dolin.zap.impl
 
 import android.util.Log
-import com.suyghur.dolin.zap.internal.IRecord
+import com.dolin.zap.internal.IRecord
 
 /**
  * @author #Suyghur.

+ 8 - 8
library_zap/src/main/java/com/suyghur/dolin/zap/impl/ZapPrint.kt → library_zap/src/main/java/com/dolin/zap/impl/ZapPrint.kt

@@ -1,15 +1,15 @@
-package com.suyghur.dolin.zap.impl
+package com.dolin.zap.impl
 
 import android.app.Application
 import android.text.TextUtils
 import android.util.Log
-import com.suyghur.dolin.common.util.FileUtils
-import com.suyghur.dolin.zap.entity.Config
-import com.suyghur.dolin.zap.entity.Level
-import com.suyghur.dolin.zap.entity.ZapData
-import com.suyghur.dolin.zap.format.DateFileFormatter
-import com.suyghur.dolin.zap.internal.IPrint
-import com.suyghur.dolin.zap.lifecycle.ZapLifecycle
+import com.dolin.common.util.FileUtils
+import com.dolin.zap.entity.Config
+import com.dolin.zap.entity.Level
+import com.dolin.zap.entity.ZapData
+import com.dolin.zap.format.DateFileFormatter
+import com.dolin.zap.internal.IPrint
+import com.dolin.zap.lifecycle.ZapLifecycle
 import java.io.File
 import java.lang.reflect.Array
 import java.text.SimpleDateFormat

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/internal/ICatch.kt → library_zap/src/main/java/com/dolin/zap/internal/ICatch.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.internal
+package com.dolin.zap.internal
 
 /**
  * @author #Suyghur.

+ 2 - 2
library_zap/src/main/java/com/suyghur/dolin/zap/internal/IFormatter.kt → library_zap/src/main/java/com/dolin/zap/internal/IFormatter.kt

@@ -1,6 +1,6 @@
-package com.suyghur.dolin.zap.internal
+package com.dolin.zap.internal
 
-import com.suyghur.dolin.zap.entity.Level
+import com.dolin.zap.entity.Level
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/internal/IPrint.kt → library_zap/src/main/java/com/dolin/zap/internal/IPrint.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.internal
+package com.dolin.zap.internal
 
 /**
  * @author #Suyghur.

+ 1 - 1
library_zap/src/main/java/com/suyghur/dolin/zap/internal/IRecord.kt → library_zap/src/main/java/com/dolin/zap/internal/IRecord.kt

@@ -1,4 +1,4 @@
-package com.suyghur.dolin.zap.internal
+package com.dolin.zap.internal
 
 /**
  * @author #Suyghur.

+ 2 - 2
library_zap/src/main/java/com/suyghur/dolin/zap/lifecycle/ZapLifecycle.kt → library_zap/src/main/java/com/dolin/zap/lifecycle/ZapLifecycle.kt

@@ -1,9 +1,9 @@
-package com.suyghur.dolin.zap.lifecycle
+package com.dolin.zap.lifecycle
 
 import android.app.Activity
 import android.app.Application
 import android.os.Bundle
-import com.suyghur.dolin.zap.impl.Record2MMap
+import com.dolin.zap.impl.Record2MMap
 
 
 /**

+ 2 - 2
library_zap/src/main/java/com/suyghur/dolin/zap/util/LevelUtils.kt → library_zap/src/main/java/com/dolin/zap/util/LevelUtils.kt

@@ -1,6 +1,6 @@
-package com.suyghur.dolin.zap.util
+package com.dolin.zap.util
 
-import com.suyghur.dolin.zap.entity.Level
+import com.dolin.zap.entity.Level
 
 /**
  * @author #Suyghur.