Browse Source

first commit

gesofts 5 years ago
commit
c54e44805c
100 changed files with 1825 additions and 0 deletions
  1. 0 0
      README.md
  2. 1 0
      app/.gitignore
  3. 148 0
      app/app.iml
  4. 35 0
      app/build.gradle
  5. 21 0
      app/proguard-rules.pro
  6. 26 0
      app/src/androidTest/java/com/gesoft/czreal/ExampleInstrumentedTest.java
  7. 37 0
      app/src/main/AndroidManifest.xml
  8. 71 0
      app/src/main/java/com/gesoft/czreal/MainActivity.java
  9. 189 0
      app/src/main/java/com/gesoft/czreal/common/base/BaseActivity.java
  10. 93 0
      app/src/main/java/com/gesoft/czreal/common/base/BaseFragment.java
  11. 42 0
      app/src/main/java/com/gesoft/czreal/common/base/CommonPagerAdapter.java
  12. 43 0
      app/src/main/java/com/gesoft/czreal/common/bean/Method.java
  13. 61 0
      app/src/main/java/com/gesoft/czreal/common/bean/MsgModel.java
  14. 17 0
      app/src/main/java/com/gesoft/czreal/common/http/ActivityTaskPostExecute.java
  15. 16 0
      app/src/main/java/com/gesoft/czreal/common/http/FragmentTaskPostExecute.java
  16. 214 0
      app/src/main/java/com/gesoft/czreal/common/http/HttpTask.java
  17. 103 0
      app/src/main/java/com/gesoft/czreal/common/http/LoadingDialog.java
  18. 10 0
      app/src/main/java/com/gesoft/czreal/common/http/TaskPostExecute.java
  19. 22 0
      app/src/main/java/com/gesoft/czreal/utils/LogUtil.java
  20. 34 0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  21. BIN
      app/src/main/res/drawable/dialog_loading.png
  22. 170 0
      app/src/main/res/drawable/ic_launcher_background.xml
  23. BIN
      app/src/main/res/drawable/loading_bg.9.png
  24. 7 0
      app/src/main/res/drawable/rotation_dialog_loading.xml
  25. 25 0
      app/src/main/res/layout/activity_main.xml
  26. 38 0
      app/src/main/res/layout/dialog_loading.xml
  27. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  28. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  29. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  30. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  31. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  32. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  33. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  34. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  35. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  36. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  37. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  38. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  39. 6 0
      app/src/main/res/values/colors.xml
  40. 3 0
      app/src/main/res/values/strings.xml
  41. 22 0
      app/src/main/res/values/styles.xml
  42. 17 0
      app/src/test/java/com/gesoft/czreal/ExampleUnitTest.java
  43. 27 0
      build.gradle
  44. 1 0
      build/android-profile/profile-2019-08-01-11-24-44-293.json
  45. BIN
      build/android-profile/profile-2019-08-01-11-24-44-293.rawproto
  46. 1 0
      build/android-profile/profile-2019-08-01-11-26-04-532.json
  47. BIN
      build/android-profile/profile-2019-08-01-11-26-04-532.rawproto
  48. 1 0
      build/android-profile/profile-2019-08-01-11-26-23-505.json
  49. BIN
      build/android-profile/profile-2019-08-01-11-26-23-505.rawproto
  50. 1 0
      build/android-profile/profile-2019-08-01-11-26-28-229.json
  51. BIN
      build/android-profile/profile-2019-08-01-11-26-28-229.rawproto
  52. 1 0
      build/android-profile/profile-2019-08-01-11-27-03-202.json
  53. BIN
      build/android-profile/profile-2019-08-01-11-27-03-202.rawproto
  54. 1 0
      build/android-profile/profile-2019-08-01-11-27-06-814.json
  55. BIN
      build/android-profile/profile-2019-08-01-11-27-06-814.rawproto
  56. 1 0
      build/android-profile/profile-2019-08-01-11-30-00-781.json
  57. BIN
      build/android-profile/profile-2019-08-01-11-30-00-781.rawproto
  58. 1 0
      build/android-profile/profile-2019-08-01-11-30-02-700.json
  59. BIN
      build/android-profile/profile-2019-08-01-11-30-02-700.rawproto
  60. 1 0
      build/android-profile/profile-2019-08-01-11-32-58-955.json
  61. BIN
      build/android-profile/profile-2019-08-01-11-32-58-955.rawproto
  62. 1 0
      build/android-profile/profile-2019-08-01-11-33-01-851.json
  63. BIN
      build/android-profile/profile-2019-08-01-11-33-01-851.rawproto
  64. 1 0
      build/android-profile/profile-2019-08-01-11-33-52-282.json
  65. BIN
      build/android-profile/profile-2019-08-01-11-33-52-282.rawproto
  66. 1 0
      build/android-profile/profile-2019-08-01-13-49-08-138.json
  67. BIN
      build/android-profile/profile-2019-08-01-13-49-08-138.rawproto
  68. 1 0
      build/android-profile/profile-2019-08-01-13-50-57-474.json
  69. BIN
      build/android-profile/profile-2019-08-01-13-50-57-474.rawproto
  70. 1 0
      build/android-profile/profile-2019-08-01-13-53-48-740.json
  71. BIN
      build/android-profile/profile-2019-08-01-13-53-48-740.rawproto
  72. 1 0
      build/android-profile/profile-2019-08-01-13-54-36-500.json
  73. BIN
      build/android-profile/profile-2019-08-01-13-54-36-500.rawproto
  74. 1 0
      build/android-profile/profile-2019-08-01-14-02-14-444.json
  75. BIN
      build/android-profile/profile-2019-08-01-14-02-14-444.rawproto
  76. 1 0
      build/android-profile/profile-2019-08-01-14-03-15-817.json
  77. BIN
      build/android-profile/profile-2019-08-01-14-03-15-817.rawproto
  78. 1 0
      build/android-profile/profile-2019-08-01-14-10-33-831.json
  79. BIN
      build/android-profile/profile-2019-08-01-14-10-33-831.rawproto
  80. 1 0
      build/android-profile/profile-2019-08-01-14-11-49-107.json
  81. BIN
      build/android-profile/profile-2019-08-01-14-11-49-107.rawproto
  82. 1 0
      build/android-profile/profile-2019-08-01-14-13-16-366.json
  83. BIN
      build/android-profile/profile-2019-08-01-14-13-16-366.rawproto
  84. 1 0
      build/android-profile/profile-2019-08-01-14-15-08-651.json
  85. BIN
      build/android-profile/profile-2019-08-01-14-15-08-651.rawproto
  86. 1 0
      build/android-profile/profile-2019-08-01-14-44-21-618.json
  87. BIN
      build/android-profile/profile-2019-08-01-14-44-21-618.rawproto
  88. 1 0
      build/android-profile/profile-2019-08-01-15-05-02-750.json
  89. BIN
      build/android-profile/profile-2019-08-01-15-05-02-750.rawproto
  90. 1 0
      build/android-profile/profile-2019-08-01-15-05-05-164.json
  91. BIN
      build/android-profile/profile-2019-08-01-15-05-05-164.rawproto
  92. 1 0
      build/android-profile/profile-2019-08-01-15-07-31-031.json
  93. BIN
      build/android-profile/profile-2019-08-01-15-07-31-031.rawproto
  94. 19 0
      czReal.iml
  95. 17 0
      gradle.properties
  96. BIN
      gradle/wrapper/gradle-wrapper.jar
  97. 6 0
      gradle/wrapper/gradle-wrapper.properties
  98. 160 0
      gradlew
  99. 90 0
      gradlew.bat
  100. 0 0
      local.properties

+ 0 - 0
README.md


+ 1 - 0
app/.gitignore

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

+ 148 - 0
app/app.iml

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="android-gradle" name="Android-Gradle">
+      <configuration>
+        <option name="GRADLE_PROJECT_PATH" value=":app" />
+      </configuration>
+    </facet>
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="SELECTED_BUILD_VARIANT" value="debug" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+        <afterSyncTasks>
+          <task>generateDebugSources</task>
+        </afterSyncTasks>
+        <option name="ALLOW_USER_CONFIGURATION" value="false" />
+        <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
+        <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
+        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
+        <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
+    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/processing-tools" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/splits-support" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
+      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
+    </content>
+    <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="com.android.support:support-media-compat-26.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="junit:junit:4.12@jar" level="project" />
+    <orderEntry type="library" name="android.arch.lifecycle:common:1.0.0@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:support-fragment-26.1.0" level="project" />
+    <orderEntry type="library" name="com.alibaba:fastjson:1.1.71.android@jar" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-core-3.0.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="javax.inject:javax.inject:1@jar" level="project" />
+    <orderEntry type="library" name="com.squareup.okhttp3:okhttp:3.14.2@jar" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.squareup:javawriter:2.1.1@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:support-vector-drawable-26.1.0" level="project" />
+    <orderEntry type="library" name="android.arch.lifecycle:runtime-1.0.0" level="project" />
+    <orderEntry type="library" name="com.android.support:appcompat-v7-26.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.android.support.test:monitor-1.0.2" level="project" />
+    <orderEntry type="library" name="com.android.support:support-annotations:26.1.0@jar" level="project" />
+    <orderEntry type="library" name="com.squareup.okio:okio:1.17.2@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:support-core-utils-26.1.0" level="project" />
+    <orderEntry type="library" name="com.android.support:support-core-ui-26.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.android.support.test:runner-1.0.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
+    <orderEntry type="library" name="com.android.support.constraint:constraint-layout-1.1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-idling-resource-3.0.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-core:1.3@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:support-compat-26.1.0" level="project" />
+    <orderEntry type="library" name="android.arch.core:common:1.0.0@jar" level="project" />
+    <orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-library:1.3@jar" level="project" />
+    <orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
+    <orderEntry type="library" name="com.android.support.constraint:constraint-layout-solver:1.1.3@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:support-v4-26.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="net.sf.kxml:kxml2:2.3.0@jar" level="project" />
+    <orderEntry type="library" name="com.android.support:animated-vector-drawable-26.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="com.android.support:support-annotations:27.1.1@jar" level="project" />
+  </component>
+</module>

+ 35 - 0
app/build.gradle

@@ -0,0 +1,35 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 26
+    buildToolsVersion '27.0.3'
+    defaultConfig {
+        applicationId "com.gesoft.czreal"
+        minSdkVersion 14
+        targetSdkVersion 26
+        versionCode 1
+        versionName "1.0"
+        vectorDrawables.useSupportLibrary = true
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation 'com.android.support:appcompat-v7:26.1.0'
+    implementation 'com.squareup.okhttp3:okhttp:3.14.2'
+    implementation 'com.alibaba:fastjson:1.1.71.android'
+    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}

+ 21 - 0
app/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

+ 26 - 0
app/src/androidTest/java/com/gesoft/czreal/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.gesoft.czreal;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() throws Exception {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.gesoft.czreal", appContext.getPackageName());
+    }
+}

+ 37 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.gesoft.czreal">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.BODY_SENSORS" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+        <activity android:name=".MainActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

+ 71 - 0
app/src/main/java/com/gesoft/czreal/MainActivity.java

@@ -0,0 +1,71 @@
+package com.gesoft.czreal;
+
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.gesoft.czreal.common.base.BaseActivity;
+import com.gesoft.czreal.common.bean.Method;
+import com.gesoft.czreal.common.bean.MsgModel;
+import com.gesoft.czreal.common.http.ActivityTaskPostExecute;
+import com.gesoft.czreal.common.http.HttpTask;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class MainActivity extends BaseActivity {
+
+    TextView tv_hello;
+    Button btn_ok;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        //setContentView(R.layout.activity_main);
+
+        tv_hello = findViewById(R.id.tv_hello);
+        btn_ok = findViewById(R.id.btn_ok);
+        btn_ok.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Method method = new Method();
+                method.setMethodName("/test/list");
+                method.put("v", "v");
+                addAutoLifecycleAsyncTask(new AutoLifecycleAsyncTaskBuilder() {
+                    @Override
+                    public AsyncTask build() {
+                        return new HttpTask(MainActivity.this, method, "初使化数据...", new TestTask()).execute();
+                    }
+                });
+            }
+        });
+
+
+    }
+
+    @Override
+    protected BaseActivity setActivity() {
+        return this;
+    }
+
+    @Override
+    protected void setContentView() {
+        setContentView(R.layout.activity_main);
+    }
+
+    @Override
+    protected List<AsyncTask> createList() {
+        return new ArrayList<>();
+    }
+
+    private class TestTask implements ActivityTaskPostExecute<MainActivity> {
+        @Override
+        public void onPostExecuteActivity(MainActivity activity, MsgModel result) {
+            if (result.isSuccess()){
+                List<Map<String,Object>> data= (List<Map<String, Object>>) result.getData();
+                tv_hello.setText(data.get(0).get("name").toString());
+            }
+        }
+    }
+}

+ 189 - 0
app/src/main/java/com/gesoft/czreal/common/base/BaseActivity.java

@@ -0,0 +1,189 @@
+package com.gesoft.czreal.common.base;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.support.annotation.Nullable;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+
+
+import com.gesoft.czreal.BuildConfig;
+
+import java.util.List;
+
+public abstract class BaseActivity<A extends BaseActivity> extends AppCompatActivity {
+    private String tag;
+    private static final String SYSTEM_EXIT = BuildConfig.APPLICATION_ID.concat(".exit");
+    // Activity 完全退出广播
+    private ExitReceiver receiver;
+    // 主线程handler,处理界面UI刷新
+    private Handler mHandler;
+    // 子线程handler,处理耗时任务
+    private Handler tHandler;
+    // AsyncTask 集合,处理GrpcTask生命周期
+    private List<AsyncTask> list;
+    // 当前Activity
+    private A activity;
+    private Toolbar toolbar;
+    // 子线程
+    private HandlerThread thread;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        tag = this.getClass().getSimpleName();
+        activity = setActivity();
+        //注册广播,用于退出程序
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(SYSTEM_EXIT);
+        receiver = new ExitReceiver();
+        this.registerReceiver(receiver, filter);
+        list = createList();
+
+        setContentView();
+
+        try {
+            /*toolbar = (Toolbar) findViewById(R.id.toolbar);
+            if (toolbar != null) {
+                setSupportActionBar(toolbar);
+                if (!(this instanceof HomeActivity)) {
+                    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+                    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            onBackPressed();
+                        }
+                    });
+                }
+            }*/
+        } catch (Exception e) {
+        }
+    }
+
+    public HandlerThread getThread() {
+        return thread;
+    }
+
+    public void setThread(HandlerThread thread) {
+        this.thread = thread;
+    }
+
+    protected abstract A setActivity();
+
+    protected abstract void setContentView();
+
+    public Toolbar getToolbar() {
+        return toolbar;
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        this.unregisterReceiver(receiver);
+        if (mHandler != null) {
+            mHandler.removeCallbacksAndMessages(null);
+        }
+
+        if (tHandler != null) {
+            tHandler.removeCallbacksAndMessages(null);
+        }
+        if (thread != null) {
+            thread.quitSafely();
+        }
+        if (list != null && list.size() > 0) {
+            for (AsyncTask asyncTask : list) {
+                if (!asyncTask.isCancelled() && asyncTask.getStatus() != AsyncTask.Status.FINISHED) {
+                    asyncTask.cancel(true);
+                    list.remove(asyncTask);
+                }
+            }
+            list.clear();
+            list = null;
+        }
+    }
+
+    @Override
+    public void onBackPressed() {
+        /*if (this instanceof HomeActivity) {
+            // 完全退出
+            Intent intent = new Intent(SYSTEM_EXIT);
+            intent.putExtra("closeAll", 1);
+            sendBroadcast(intent);//发送广播
+        } else {
+            super.onBackPressed();
+        }*/
+    }
+
+    public A getActivity() {
+        return activity;
+    }
+
+    public Context getContext() {
+        return activity.getApplicationContext();
+    }
+
+    public String getTag() {
+        return tag;
+    }
+
+    protected Handler getAutoLifeCyclemHandler() {
+        return mHandler;
+    }
+
+    protected Handler getAutoLifeCycletHandler() {
+        return tHandler;
+    }
+
+    protected void setAutoLifeCyclemHandler(Handler handler) {
+        mHandler = handler;
+    }
+
+    protected void setAutoLifeCycletHandler(Handler handler) {
+        tHandler = handler;
+    }
+
+    public List<AsyncTask> getAsyncTaskList() {
+        return list;
+    }
+
+    protected abstract List<AsyncTask> createList();
+
+    /**
+     * 使用 AsyncTask 中的并行线程池
+     *
+     * @param run
+     */
+    protected void parallelExecute(Runnable run) {
+        AsyncTask.THREAD_POOL_EXECUTOR.execute(run);
+    }
+
+    /**
+     * 使用 AsyncTask 中的串行线程池
+     *
+     * @param run
+     */
+    protected void serialExecute(Runnable run) {
+        AsyncTask.execute(run);
+    }
+
+    private class ExitReceiver extends BroadcastReceiver {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            ((AppCompatActivity) context).finish();
+        }
+    }
+
+    protected void addAutoLifecycleAsyncTask(AutoLifecycleAsyncTaskBuilder asyncTask) {
+        list.add(asyncTask.build());
+    }
+
+    public interface AutoLifecycleAsyncTaskBuilder {
+        AsyncTask build();
+    }
+}

+ 93 - 0
app/src/main/java/com/gesoft/czreal/common/base/BaseFragment.java

@@ -0,0 +1,93 @@
+package com.gesoft.czreal.common.base;
+
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.Handler;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+
+import java.util.List;
+
+/**
+ * @author WJZ
+ * @name BaseFragment
+ * @date 2018/6/24
+ */
+
+public abstract class BaseFragment<F extends BaseFragment> extends Fragment {
+    private Handler         mHandler;
+    private Handler         tHandler;
+    private List<AsyncTask> list;
+    private F fragment;
+    private String tag;
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        fragment = setFragment();
+        list = createList();
+        tag = this.getClass().getSimpleName();
+    }
+
+    public String tag() {
+        return tag;
+    }
+
+    protected Handler getAutoLifeCyclemHandler() {
+        return mHandler;
+    }
+
+    protected Handler getAutoLifeCycletHandler() {
+        return tHandler;
+    }
+
+    protected void setAutoLifeCyclemHandler(Handler handler) {
+        mHandler = handler;
+    }
+
+    protected void setAutoLifeCycletHandler(Handler handler) {
+        tHandler = handler;
+    }
+
+    public List<AsyncTask> getAsyncTaskList() {
+        return list;
+    }
+
+    protected abstract List<AsyncTask> createList();
+
+    protected abstract F setFragment();
+
+    public F getFragment() {
+        return fragment;
+    }
+
+    protected void addAutoLifecycleAsyncTask(AutoLifecycleAsyncTaskBuilder asyncTask) {
+        list.add(asyncTask.build());
+    }
+
+    public interface AutoLifecycleAsyncTaskBuilder {
+        AsyncTask build();
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+
+        if (mHandler != null) {
+            mHandler.removeCallbacksAndMessages(null);
+        }
+        if (tHandler != null) {
+            tHandler.removeCallbacksAndMessages(null);
+        }
+
+        if (list != null && list.size() > 0) {
+            for (AsyncTask asyncTask : list) {
+                if (!asyncTask.isCancelled() && asyncTask.getStatus() != AsyncTask.Status.FINISHED) {
+                    asyncTask.cancel(true);
+                    list.remove(asyncTask);
+                }
+            }
+            list.clear();
+            list = null;
+        }
+    }
+}

+ 42 - 0
app/src/main/java/com/gesoft/czreal/common/base/CommonPagerAdapter.java

@@ -0,0 +1,42 @@
+package com.gesoft.czreal.common.base;
+
+import android.view.View;
+import android.view.ViewGroup;
+
+import java.util.List;
+
+/**
+ * Created by Jay on 2015/10/8 0008.
+ */
+public class CommonPagerAdapter extends android.support.v4.view.PagerAdapter {
+    private List<? extends View> viewLists;
+
+    public CommonPagerAdapter() {
+    }
+
+    public CommonPagerAdapter(List<? extends View> viewLists) {
+        super();
+        this.viewLists = viewLists;
+    }
+
+    @Override
+    public int getCount() {
+        return viewLists.size();
+    }
+
+    @Override
+    public boolean isViewFromObject(View view, Object object) {
+        return view == object;
+    }
+
+    @Override
+    public Object instantiateItem(ViewGroup container, int position) {
+        container.addView(viewLists.get(position));
+        return viewLists.get(position);
+    }
+
+    @Override
+    public void destroyItem(ViewGroup container, int position, Object object) {
+        container.removeView(viewLists.get(position));
+    }
+}

+ 43 - 0
app/src/main/java/com/gesoft/czreal/common/bean/Method.java

@@ -0,0 +1,43 @@
+package com.gesoft.czreal.common.bean;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by wangcl on 2019/8/1.
+ */
+
+public class Method implements Serializable {
+
+    /**
+     * 方法名称
+     */
+    private String methodName;
+
+    private Map<String, String> map = new HashMap<>();
+
+    public void put(String key, String value){
+        map.put(key, value);
+    }
+
+    public void putAll(Map<String, String> tmpMap){
+        map.putAll(tmpMap);
+    }
+
+    public String getMethodName() {
+        return methodName;
+    }
+
+    public void setMethodName(String methodName) {
+        this.methodName = methodName;
+    }
+
+    public Map<String, String> getMap() {
+        return map;
+    }
+
+    public void setMap(Map<String, String> map) {
+        this.map = map;
+    }
+}

+ 61 - 0
app/src/main/java/com/gesoft/czreal/common/bean/MsgModel.java

@@ -0,0 +1,61 @@
+package com.gesoft.czreal.common.bean;
+
+
+import java.io.Serializable;
+
+public class MsgModel implements Serializable {
+    private Method inMethod = null;
+    private String msg = "操作失败";
+    private int code;
+    private boolean success = false;
+    private int total;
+    private Object data;
+
+    public Method getInMethod() {
+        return inMethod;
+    }
+
+    public void setInMethod(Method inMethod) {
+        this.inMethod = inMethod;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+}

+ 17 - 0
app/src/main/java/com/gesoft/czreal/common/http/ActivityTaskPostExecute.java

@@ -0,0 +1,17 @@
+package com.gesoft.czreal.common.http;
+
+import android.app.Activity;
+
+import com.gesoft.czreal.common.bean.Method;
+import com.gesoft.czreal.common.bean.MsgModel;
+
+
+/**
+ * @author GKX100283
+ * @name ActivityTaskPostExecute
+ * @date 2018/5/28
+ */
+
+public interface ActivityTaskPostExecute <A extends Activity>{
+    void onPostExecuteActivity(A activity, MsgModel result);
+}

+ 16 - 0
app/src/main/java/com/gesoft/czreal/common/http/FragmentTaskPostExecute.java

@@ -0,0 +1,16 @@
+package com.gesoft.czreal.common.http;
+
+import android.support.v4.app.Fragment;
+
+import com.gesoft.czreal.common.bean.Method;
+import com.gesoft.czreal.common.bean.MsgModel;
+
+/**
+ * @author GKX100283
+ * @name ActivityTaskPostExecute
+ * @date 2018/5/28
+ */
+
+public interface FragmentTaskPostExecute <F extends Fragment>{
+    void onPostExecuteActivity(F fragment, MsgModel result);
+}

+ 214 - 0
app/src/main/java/com/gesoft/czreal/common/http/HttpTask.java

@@ -0,0 +1,214 @@
+package com.gesoft.czreal.common.http;
+
+import android.annotation.TargetApi;
+import android.os.AsyncTask;
+import android.os.Build;
+
+import com.alibaba.fastjson.JSON;
+import com.gesoft.czreal.BuildConfig;
+import com.gesoft.czreal.common.base.BaseActivity;
+import com.gesoft.czreal.common.base.BaseFragment;
+import com.gesoft.czreal.common.bean.Method;
+import com.gesoft.czreal.common.bean.MsgModel;
+import com.gesoft.czreal.utils.LogUtil;
+
+
+import java.lang.ref.WeakReference;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.Call;
+import okhttp3.FormBody;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+
+
+public class HttpTask  extends AsyncTask<Void, Void, MsgModel> {
+
+
+    private static final String TAG = HttpTask.class.getSimpleName();
+    private static final String mHost;
+    private static final int mPort = 8080;
+    private static final String httpUrl;
+
+    static {
+        if (BuildConfig.DEBUG) {
+            //mHost = "192.168.1.6";
+            mHost = "192.168.0.64";
+            //mHost = "192.168.0.64";
+            //mHost = "192.168.0.116";
+        } else {
+            mHost = "aly.aja6.com";
+        }
+        httpUrl = String.format("http://%s:%d", mHost, mPort);
+    }
+
+    private WeakReference<BaseActivity> activityWeakReference;
+    private WeakReference<BaseFragment> fragmentWeakReference;
+
+    private Method                  inBean;
+    private LoadingDialog           loadingDialog;
+    private String                  msg;
+    private TaskPostExecute         postExecute;
+    private ActivityTaskPostExecute activityTaskPostExecute;
+    private FragmentTaskPostExecute fragmentTaskPostExecute;
+    private OkHttpClient okHttpClient = null;
+
+    public HttpTask(Method inBean) {
+        this.inBean = inBean;
+        if (okHttpClient == null) {
+            okHttpClient = getOkHttpClient();
+        }
+    }
+
+
+    public HttpTask(BaseActivity activity, Method inBean, String msg, ActivityTaskPostExecute activityTaskPostExecute) {
+        this(inBean);
+        this.msg = msg;
+        this.activityTaskPostExecute = activityTaskPostExecute;
+        activityWeakReference = new WeakReference<>(activity);
+    }
+
+    public HttpTask(BaseFragment fragment, Method inBean, String msg, FragmentTaskPostExecute fragmentTaskPostExecute) {
+        this(inBean);
+        this.msg = msg;
+        this.fragmentTaskPostExecute = fragmentTaskPostExecute;
+        fragmentWeakReference = new WeakReference<>(fragment);
+        activityWeakReference = new WeakReference<>((BaseActivity) fragment.getActivity());
+    }
+
+
+
+
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
+    @Override
+    protected void onPreExecute() {
+        super.onPreExecute();
+        if (msg == null) {
+            return;
+        }
+        if (activityWeakReference != null &&
+                activityWeakReference.get() != null &&
+                !activityWeakReference.get().isFinishing() &&
+                !activityWeakReference.get().isDestroyed()
+                ) {
+            LoadingDialog.Builder loadBuilder = new LoadingDialog.Builder(activityWeakReference.get()).setMessage(msg);
+            loadingDialog = loadBuilder.create();
+            loadingDialog.show();
+        }
+    }
+
+    @Override
+    protected MsgModel doInBackground(Void... nothing) {
+        return service(inBean);
+    }
+
+    private MsgModel service(Method method) {
+        MsgModel msgModel = new MsgModel();
+        try{
+            checkOkHttpClient();
+            FormBody.Builder mFormBody = new FormBody.Builder();
+            if (method.getMap() != null){
+                Iterator<Map.Entry<String, String>> it = method.getMap().entrySet().iterator();
+                while (it.hasNext()){
+                    Map.Entry<String, String> en = it.next();
+                    mFormBody.add(en.getKey(), en.getValue());
+                }
+            }
+            RequestBody body = mFormBody.build();
+
+            // 3 创建请求方式
+            Request request = new Request.Builder().url(httpUrl + method.getMethodName()).post(body).build();
+
+            // 4 执行请求操作
+            Call call = okHttpClient.newCall(request);
+
+
+            Response response = call.execute();
+            if (response.isSuccessful()) {
+                final String message = response.body().string();
+                msgModel = JSON.parseObject(message, MsgModel.class);
+            }
+        }
+        catch (Exception e){
+            mLog(TAG, e.getMessage());
+        }
+        msgModel.setInMethod(method);
+        return msgModel;
+    }
+
+
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
+    @Override
+    protected void onPostExecute(MsgModel msgModel) {
+        if (loadingDialog != null) {
+            loadingDialog.cancel();
+        }
+        mLog(TAG, "onPostExecute()");
+        if (msgModel != null) {
+            //生命周期管理
+            //activity
+            if (activityWeakReference != null) {
+                BaseActivity baseActivity = activityWeakReference.get();
+                if (baseActivity != null) {
+                    if (!baseActivity.isFinishing() && !baseActivity.isDestroyed()) {
+                        List asyncTaskList = baseActivity.getAsyncTaskList();
+                        if (asyncTaskList != null) {
+                            asyncTaskList.remove(HttpTask.this);
+                        }
+                        if (activityTaskPostExecute != null) {
+                            mLog(TAG, "TaskPostExecute回调");
+                            activityTaskPostExecute.onPostExecuteActivity(baseActivity, msgModel);
+                            return;
+                        }
+                    }
+                }
+            }
+
+            //fragment
+            if (fragmentWeakReference != null) {
+                BaseFragment fragment = fragmentWeakReference.get();
+                if (fragment != null) {
+                    if (!fragment.isRemoving() && !fragment.isDetached()) {
+                        List asyncTaskList = fragment.getAsyncTaskList();
+                        if (asyncTaskList != null) {
+                            asyncTaskList.remove(HttpTask.this);
+                        }
+                        if (fragmentTaskPostExecute != null) {
+                            mLog(TAG, "TaskPostExecute回调");
+                            fragmentTaskPostExecute.onPostExecuteActivity(fragment, msgModel);
+                            return;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private OkHttpClient getOkHttpClient() {
+        OkHttpClient mOkHttpClient = new OkHttpClient.Builder()
+                .connectTimeout(10000, TimeUnit.MILLISECONDS)
+                .readTimeout(10000, TimeUnit.MILLISECONDS)
+                .build();
+        return mOkHttpClient;
+    }
+
+    public void checkOkHttpClient(){
+        if (okHttpClient == null) {
+            mLog(TAG,"重新创建新连接!");
+            getOkHttpClient();
+        }
+    }
+
+    public void mLog(String message){
+        LogUtil.mLog(TAG, message);
+    }
+
+    public void mLog(String TAG, String message){
+        LogUtil.mLog(TAG, message);
+    }
+}

+ 103 - 0
app/src/main/java/com/gesoft/czreal/common/http/LoadingDialog.java

@@ -0,0 +1,103 @@
+package com.gesoft.czreal.common.http;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
+
+import com.gesoft.czreal.R;
+
+
+/**
+ * Created by tjy on 2017/6/19.
+ */
+public class LoadingDialog extends Dialog{
+
+
+    public LoadingDialog(Activity context) {
+        super(context);
+    }
+
+    public LoadingDialog(Activity context, int themeResId) {
+        super(context, themeResId);
+    }
+
+    public static class Builder{
+
+        private Activity context;
+        private String message;
+        private boolean isShowMessage=true;
+        private boolean isCancelable=false;
+        private boolean isCancelOutside=false;
+
+
+        public Builder(Activity context) {
+            this.context = context;
+        }
+
+        /**
+         * 设置提示信息
+         * @param message
+         * @return
+         */
+
+        public Builder setMessage(String message){
+            this.message=message;
+            return this;
+        }
+
+        /**
+         * 设置是否显示提示信息
+         * @param isShowMessage
+         * @return
+         */
+        public Builder setShowMessage(boolean isShowMessage){
+            this.isShowMessage=isShowMessage;
+            return this;
+        }
+
+        /**
+         * 设置是否可以按返回键取消
+         * @param isCancelable
+         * @return
+         */
+
+        public Builder setCancelable(boolean isCancelable){
+            this.isCancelable=isCancelable;
+            return this;
+        }
+
+        /**
+         * 设置是否可以取消
+         * @param isCancelOutside
+         * @return
+         */
+        public Builder setCancelOutside(boolean isCancelOutside){
+            this.isCancelOutside=isCancelOutside;
+            return this;
+        }
+
+        public LoadingDialog create(){
+
+            LayoutInflater inflater = LayoutInflater.from(context);
+            View view=inflater.inflate(R.layout.dialog_loading,null);
+            LoadingDialog loadingDailog=new LoadingDialog(context,R.style.MyDialogStyle);
+            TextView msgText= (TextView) view.findViewById(R.id.tipTextView);
+            if(isShowMessage){
+                msgText.setText(message);
+            }else{
+                msgText.setVisibility(View.GONE);
+            }
+            loadingDailog.setContentView(view);
+            loadingDailog.setCancelable(isCancelable);
+            loadingDailog.setCanceledOnTouchOutside(isCancelOutside);
+            //loadingDailog.setOwnerActivity(context);
+
+            return  loadingDailog;
+
+        }
+
+
+    }
+}

+ 10 - 0
app/src/main/java/com/gesoft/czreal/common/http/TaskPostExecute.java

@@ -0,0 +1,10 @@
+package com.gesoft.czreal.common.http;
+
+
+import com.gesoft.czreal.common.bean.Method;
+import com.gesoft.czreal.common.bean.MsgModel;
+
+
+public interface TaskPostExecute {
+    void onPostExecute(MsgModel result);
+}

+ 22 - 0
app/src/main/java/com/gesoft/czreal/utils/LogUtil.java

@@ -0,0 +1,22 @@
+package com.gesoft.czreal.utils;
+
+import android.util.Log;
+
+import com.gesoft.czreal.BuildConfig;
+
+
+/**
+ * Copyright (c) 2018 WJZ CORPORATION
+ *
+ * @author wujiazhen
+ * @file com.imeili.utils.LogUtil
+ * <p>
+ * [DESCRIPTION]
+ * @change [DATE] [EDITOR] [MODEL] [TYPE] [COMMENT]
+ */
+
+public class LogUtil {
+    public static void mLog(String tag,String str){
+        if (BuildConfig.DEBUG) Log.i(tag,"--- "+str+" ---");
+    }
+}

File diff suppressed because it is too large
+ 34 - 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml


BIN
app/src/main/res/drawable/dialog_loading.png


+ 170 - 0
app/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportHeight="108"
+    android:viewportWidth="108">
+    <path
+        android:fillColor="#26A69A"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeColor="#33FFFFFF"
+        android:strokeWidth="0.8" />
+</vector>

BIN
app/src/main/res/drawable/loading_bg.9.png


+ 7 - 0
app/src/main/res/drawable/rotation_dialog_loading.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rotate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:drawable="@drawable/dialog_loading"
+    android:pivotX="50%"
+    android:pivotY="50%"
+    android:fromDegrees="0"
+    android:toDegrees="360" />

+ 25 - 0
app/src/main/res/layout/activity_main.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.gesoft.czreal.MainActivity">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Hello World!"
+        android:id="@+id/tv_hello"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <Button
+        android:id="@+id/btn_ok"
+        android:layout_width="match_parent"
+        android:text="测试"
+        android:layout_height="wrap_content" />
+
+</android.support.constraint.ConstraintLayout>

+ 38 - 0
app/src/main/res/layout/dialog_loading.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/dialog_loading_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="150dp"
+        android:layout_height="110dp"
+        android:background="@drawable/loading_bg"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:paddingBottom="10dp"
+        android:paddingLeft="21dp"
+        android:paddingRight="21dp"
+        android:paddingTop="10dp">
+
+        <ProgressBar
+            android:id="@+id/progressBar1"
+            android:layout_width="35dp"
+            android:layout_height="35dp"
+            android:layout_gravity="center_horizontal"
+            android:indeterminateDrawable="@drawable/rotation_dialog_loading"
+            />
+
+        <TextView
+            android:id="@+id/tipTextView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="15dp"
+            android:text="加载中..."
+            android:textColor="#f0f0f0"
+            android:textSize="15sp" />
+    </LinearLayout>
+
+</LinearLayout>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 6 - 0
app/src/main/res/values/colors.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#3F51B5</color>
+    <color name="colorPrimaryDark">#303F9F</color>
+    <color name="colorAccent">#FF4081</color>
+</resources>

+ 3 - 0
app/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">czReal</string>
+</resources>

+ 22 - 0
app/src/main/res/values/styles.xml

@@ -0,0 +1,22 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+    <style name="MyDialogStyle">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
+        <item name="android:backgroundDimEnabled">true</item>
+    </style>
+
+</resources>

+ 17 - 0
app/src/test/java/com/gesoft/czreal/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.gesoft.czreal;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() throws Exception {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 27 - 0
build.gradle

@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.0.1'
+        
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-24-44-293.json


BIN
build/android-profile/profile-2019-08-01-11-24-44-293.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-26-04-532.json


BIN
build/android-profile/profile-2019-08-01-11-26-04-532.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-26-23-505.json


BIN
build/android-profile/profile-2019-08-01-11-26-23-505.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-26-28-229.json


BIN
build/android-profile/profile-2019-08-01-11-26-28-229.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-27-03-202.json


BIN
build/android-profile/profile-2019-08-01-11-27-03-202.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-27-06-814.json


BIN
build/android-profile/profile-2019-08-01-11-27-06-814.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-30-00-781.json


BIN
build/android-profile/profile-2019-08-01-11-30-00-781.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-30-02-700.json


BIN
build/android-profile/profile-2019-08-01-11-30-02-700.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-32-58-955.json


BIN
build/android-profile/profile-2019-08-01-11-32-58-955.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-33-01-851.json


BIN
build/android-profile/profile-2019-08-01-11-33-01-851.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-11-33-52-282.json


BIN
build/android-profile/profile-2019-08-01-11-33-52-282.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-13-49-08-138.json


BIN
build/android-profile/profile-2019-08-01-13-49-08-138.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-13-50-57-474.json


BIN
build/android-profile/profile-2019-08-01-13-50-57-474.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-13-53-48-740.json


BIN
build/android-profile/profile-2019-08-01-13-53-48-740.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-13-54-36-500.json


BIN
build/android-profile/profile-2019-08-01-13-54-36-500.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-02-14-444.json


BIN
build/android-profile/profile-2019-08-01-14-02-14-444.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-03-15-817.json


BIN
build/android-profile/profile-2019-08-01-14-03-15-817.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-10-33-831.json


BIN
build/android-profile/profile-2019-08-01-14-10-33-831.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-11-49-107.json


BIN
build/android-profile/profile-2019-08-01-14-11-49-107.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-13-16-366.json


BIN
build/android-profile/profile-2019-08-01-14-13-16-366.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-15-08-651.json


BIN
build/android-profile/profile-2019-08-01-14-15-08-651.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-14-44-21-618.json


BIN
build/android-profile/profile-2019-08-01-14-44-21-618.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-15-05-02-750.json


BIN
build/android-profile/profile-2019-08-01-15-05-02-750.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-15-05-05-164.json


BIN
build/android-profile/profile-2019-08-01-15-05-05-164.rawproto


File diff suppressed because it is too large
+ 1 - 0
build/android-profile/profile-2019-08-01-15-07-31-031.json


BIN
build/android-profile/profile-2019-08-01-15-07-31-031.rawproto


+ 19 - 0
czReal.iml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="czReal" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="java-gradle" name="Java-Gradle">
+      <configuration>
+        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
+        <option name="BUILDABLE" value="false" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 17 - 0
gradle.properties

@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true

BIN
gradle/wrapper/gradle-wrapper.jar


+ 6 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Thu Aug 01 09:35:42 CST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

+ 160 - 0
gradlew

@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90 - 0
gradlew.bat

@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 0 - 0
local.properties


Some files were not shown because too many files changed in this diff