├── .gitignore
├── README.md
├── binder
└── binder.png
├── common-tec
├── CommonTec
│ ├── .gitignore
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── commontec
│ │ │ │ └── ExampleInstrumentedTest.kt
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets
│ │ │ │ └── plugin.apk
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── commontec
│ │ │ │ │ ├── Logger.kt
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── activity
│ │ │ │ │ ├── StubBaseActivity.kt
│ │ │ │ │ ├── ainterface
│ │ │ │ │ │ ├── StubInterfaceActivity.kt
│ │ │ │ │ │ └── iplugin
│ │ │ │ │ │ │ ├── BasePluginActivity.kt
│ │ │ │ │ │ │ └── IPluginActivity.kt
│ │ │ │ │ ├── hook
│ │ │ │ │ │ ├── AppInstrumentation.kt
│ │ │ │ │ │ ├── HookStubActivity.kt
│ │ │ │ │ │ ├── PluginContext.java
│ │ │ │ │ │ ├── Reflect.java
│ │ │ │ │ │ └── ReflectException.java
│ │ │ │ │ └── reflect
│ │ │ │ │ │ ├── ReflectActivity.kt
│ │ │ │ │ │ └── StubReflectActivity.kt
│ │ │ │ │ ├── broadcast
│ │ │ │ │ └── BroadcastUtils.kt
│ │ │ │ │ ├── contentprovider
│ │ │ │ │ ├── PluginUtils.kt
│ │ │ │ │ └── StubContentProvider.kt
│ │ │ │ │ └── service
│ │ │ │ │ └── StubService.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── commontec
│ │ │ └── ExampleUnitTest.kt
│ ├── architecture
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── architecture
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── architecture
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── NormalFragment.kt
│ │ │ │ │ ├── mvc
│ │ │ │ │ ├── Controller.kt
│ │ │ │ │ ├── MVCFragment.kt
│ │ │ │ │ ├── Model.kt
│ │ │ │ │ └── View.kt
│ │ │ │ │ ├── mvp
│ │ │ │ │ ├── MVPFragment.kt
│ │ │ │ │ ├── Model.kt
│ │ │ │ │ ├── Presenter.kt
│ │ │ │ │ └── View.kt
│ │ │ │ │ └── mvvm
│ │ │ │ │ ├── MVVMFragment.kt
│ │ │ │ │ ├── Model.kt
│ │ │ │ │ ├── View.kt
│ │ │ │ │ └── ViewModel.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── architecture.xml
│ │ │ │ └── architecture_binding.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── architecture
│ │ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── dynamic_feature
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ └── AndroidManifest.xml
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── hotfix
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── hotfix
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets
│ │ │ │ └── patch.apk
│ │ │ ├── cpp
│ │ │ │ ├── art_7_0.h
│ │ │ │ └── native-hook.cpp
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── hotfix
│ │ │ │ │ ├── HotfixUtils.java
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ ├── PatchActivity.kt
│ │ │ │ │ ├── insert_dex
│ │ │ │ │ └── InsertDexUtils.java
│ │ │ │ │ ├── instant_run
│ │ │ │ │ ├── InstantRunUtils.java
│ │ │ │ │ └── PatchRedirect.java
│ │ │ │ │ ├── native_hook
│ │ │ │ │ └── NativeHookUtils.kt
│ │ │ │ │ └── utils
│ │ │ │ │ ├── Reflect.java
│ │ │ │ │ └── ReflectException.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_patch.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── hotfix
│ │ │ └── ExampleUnitTest.java
│ ├── myview
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── myview
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── myview
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── MyView.kt
│ │ │ │ │ ├── VolumeBar.kt
│ │ │ │ │ └── VolumeView.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── attrs.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── myview
│ │ │ └── ExampleUnitTest.java
│ ├── patch
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── patch
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ ├── hotfix
│ │ │ │ │ ├── HotfixUtils.java
│ │ │ │ │ ├── instant_run
│ │ │ │ │ │ ├── InstantRunUtilsRedirect.java
│ │ │ │ │ │ ├── PatchInfo.java
│ │ │ │ │ │ └── PatchRedirect.java
│ │ │ │ │ └── native_hook
│ │ │ │ │ │ └── PatchNativeHookUtils.kt
│ │ │ │ │ └── patch
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_patch.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── patch
│ │ │ └── ExampleUnitTest.java
│ ├── plugin
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── plugin
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ ├── commontec
│ │ │ │ │ └── activity
│ │ │ │ │ │ └── ainterface
│ │ │ │ │ │ └── iplugin
│ │ │ │ │ │ ├── BasePluginActivity.kt
│ │ │ │ │ │ └── IPluginActivity.kt
│ │ │ │ │ └── plugin
│ │ │ │ │ ├── Logger.kt
│ │ │ │ │ ├── PluginActivity.kt
│ │ │ │ │ ├── PluginBroadcastReceiver.kt
│ │ │ │ │ ├── PluginContentProvider.kt
│ │ │ │ │ └── PluginService.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── plugin
│ │ │ └── ExampleUnitTest.java
│ ├── settings.gradle
│ └── simpleapk
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── simpleapk
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── simpleapk
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ └── ic_launcher_foreground1.xml
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── zy
│ │ └── simpleapk
│ │ └── ExampleUnitTest.java
├── android-打包.md
├── android-插件化.md
├── android-热修复.md
├── android-自定义View.md
├── android中的classloader.md
├── android架构模式.md
├── images
│ ├── architecture
│ │ ├── mvc.png
│ │ ├── mvp.png
│ │ ├── mvvm.png
│ │ ├── pro.gif
│ │ ├── summary.png
│ │ └── summary1.png
│ ├── classloader
│ │ ├── classloader.png
│ │ ├── classloader_invoke.png
│ │ ├── summary.png
│ │ └── summary1.png
│ ├── hotfix
│ │ ├── class_method.png
│ │ ├── classloader.png
│ │ ├── insert_dex.png
│ │ ├── insert_dex2.png
│ │ ├── instant_run.png
│ │ ├── native_hook.png
│ │ ├── summary.png
│ │ └── summary2.png
│ ├── myview
│ │ ├── summary.png
│ │ ├── summary2.png
│ │ ├── view.png
│ │ └── vol.gif
│ ├── package
│ │ ├── aab.png
│ │ ├── android_build_detail.png
│ │ ├── app-bundle-structure.png
│ │ ├── app-bundle.gif
│ │ ├── bundle-apks.png
│ │ ├── feature.png
│ │ ├── file-apk.png
│ │ ├── instant-run-splits.png
│ │ ├── multiple-apk-compare.png
│ │ ├── multiple-apks.png
│ │ ├── run.png
│ │ ├── summary.png
│ │ ├── summary2.png
│ │ ├── v2-signing.png
│ │ ├── v2-verify.png
│ │ └── zip.png
│ ├── plugin
│ │ ├── Instrumentation.png
│ │ ├── Instrumentation_hook.png
│ │ ├── hook_resources.png
│ │ ├── plugin.png
│ │ ├── proxy.png
│ │ ├── proxy_resources.png
│ │ ├── resources.png
│ │ ├── start_activity.png
│ │ └── summary.png
│ └── shadow
│ │ ├── binder.png
│ │ ├── framework.png
│ │ ├── shadowActivity.png
│ │ ├── startactivity.png
│ │ ├── startactivity2.png
│ │ ├── summary.png
│ │ └── summary2.png
└── shadow框架分析.md
├── gradle
├── EasyGradle
│ ├── .gitignore
│ ├── android-gradle-plugin-source
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── android_gradle_plugin_source
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── android_gradle_plugin_source
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── android_gradle_plugin_source
│ │ │ └── ExampleUnitTest.java
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── easygradle
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── easygradle
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── ModuleApi.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── easygradle
│ │ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle-plugin
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── groovy
│ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── plugin
│ │ │ │ ├── MyPlugin.groovy
│ │ │ │ ├── MyTask.groovy
│ │ │ │ └── MyTransform.groovy
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ └── gradle-plugins
│ │ │ └── myplugin.properties
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── module1
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── module1
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── module1
│ │ │ │ │ └── Module1Api.java
│ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── strings.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── module1
│ │ │ └── ExampleUnitTest.java
│ ├── module2
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── zy
│ │ │ │ └── module2
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── zy
│ │ │ │ │ └── module2
│ │ │ │ │ └── Module2Api.java
│ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── strings.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── zy
│ │ │ └── module2
│ │ │ └── ExampleUnitTest.java
│ └── settings.gradle
├── android_gradle_plugin-主要task分析.md
├── android_gradle_plugin-主要流程分析.md
├── gradle-summary.md
├── gradle源码分析.md
├── gradle的基本使用.md
└── images
│ ├── android-gradle-plugin-task
│ ├── android-app.png
│ ├── generateDebugBuildConfig.png
│ ├── mergeDebugResources.png
│ ├── processDebugManifest.png
│ ├── processDebugResources.png
│ ├── transformClassesWithDexBuilderForDebug.png
│ ├── transformDexArchiveWithDexMergerForDebug.png
│ └── transformDexArchiveWithExternalLibsDexMergerForDebug.png
│ ├── android-gradle-plugin
│ ├── plugin-all.png
│ ├── plugin-summary.png
│ ├── plugin1.png
│ ├── plugin2.png
│ ├── plugin3.png
│ ├── plugin4.png
│ └── plugin5.png
│ ├── gradle-source
│ ├── configureBuild.png
│ ├── constructTaskGraph.png
│ ├── finishBuild.png
│ ├── gradle-source-all.png
│ ├── loadsettings.png
│ ├── runTasks.png
│ ├── script-class.png
│ └── start.png
│ └── gradle-use
│ ├── dependencies-api.png
│ ├── dependencies-compileOnly.png
│ ├── dependencies-implementation.png
│ ├── dependencies-runtimeOnly.png
│ ├── dependencies.png
│ ├── gradle-api.png
│ ├── gradle-compileOnly-apk.png
│ ├── gradle-compileOnly.png
│ ├── gradle-implementation.png
│ ├── gradle-pipelining.png
│ ├── gradle-plugin-debug1.png
│ ├── gradle-plugin-debug2.png
│ ├── gradle-plugin-debug3.png
│ ├── gradle-plugin-debug4.png
│ ├── gradle-plugins.png
│ ├── gradle-project.png
│ ├── gradle-runtimeOnly.png
│ ├── gradle-use-summary.png
│ ├── gradle1.png
│ ├── gradle2.png
│ ├── gradle3.png
│ ├── gradle4.png
│ ├── gradle5.png
│ ├── gradle6.png
│ ├── gradle7.png
│ └── gradle8.png
├── images
├── ABOUT_ME.png
└── ZYLAB.jpg
├── interview
├── pic
│ ├── handler.png
│ └── input.png
├── 面试官带你学安卓-Handler这些知识点你都知道吗.md
├── 面试官带你学安卓-从View的事件分发说起.md
└── 面试官带你学安卓-从View的绘制流程说起.md
├── jvm-art
├── ART中类的真实形态.md
├── images
│ ├── art
│ │ ├── class.png
│ │ └── summary.png
│ └── reflection
│ │ ├── getmethod.png
│ │ ├── summary.png
│ │ └── summary1.png
└── java反射为什么慢.md
└── mock-in
├── 2021帮助100位安卓开发者入职大厂.md
└── 大厂模拟面试--毕业一年入职百度的优秀小伙.md
/.gitignore:
--------------------------------------------------------------------------------
1 | omni/
2 | note.md
3 | .DS_Store
4 | .idea/
5 | .settings/
6 | .project
7 | .classpath
8 | tmp/
9 | template/
--------------------------------------------------------------------------------
/binder/binder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/binder/binder.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 26
9 | defaultConfig {
10 | applicationId "com.zy.commontec"
11 | minSdkVersion 19
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | implementation fileTree(dir: 'libs', include: ['*.jar'])
26 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27 | implementation 'com.android.support:appcompat-v7:26.0.0'
28 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
29 | }
30 |
31 | project.afterEvaluate {
32 | project.tasks.each {
33 | if (it.name == 'mergeDebugAssets') {
34 | it.dependsOn ':plugin:assembleDebug'
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/androidTest/java/com/zy/commontec/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("com.zy.commontec", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/assets/plugin.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/assets/plugin.apk
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/Logger.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec
2 |
3 | import android.util.Log
4 |
5 | class Logger {
6 | companion object {
7 | private const val TAG = "COMMON_TEC"
8 | fun d (msg: String) {
9 | Log.d(TAG, msg)
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/ainterface/StubInterfaceActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.ainterface
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.os.Bundle
6 | import com.zy.commontec.activity.StubBaseActivity
7 | import com.zy.commontec.activity.ainterface.iplugin.IPluginActivity
8 |
9 | class StubInterfaceActivity : StubBaseActivity() {
10 | private var activity: IPluginActivity? = null
11 |
12 | override fun onCreate(savedInstanceState: Bundle?) {
13 | super.onCreate(savedInstanceState)
14 | activity = activityClassLoader?.loadClass(activityName)?.newInstance() as IPluginActivity?
15 | activity?.attach(this)
16 | activity?.onCreate(savedInstanceState)
17 | }
18 |
19 | override fun onStart() {
20 | super.onStart()
21 | activity?.onStart()
22 | }
23 |
24 | override fun onResume() {
25 | super.onResume()
26 | activity?.onResume()
27 | }
28 |
29 | override fun onPause() {
30 | super.onPause()
31 | activity?.onPause()
32 | }
33 |
34 | override fun onStop() {
35 | super.onStop()
36 | activity?.onStop()
37 | }
38 |
39 | override fun onDestroy() {
40 | super.onDestroy()
41 | activity?.onDestroy()
42 | }
43 |
44 | companion object {
45 | fun startPluginActivity(context: Context, pluginPath: String, activityName: String) {
46 | val intent = Intent(context, StubInterfaceActivity::class.java)
47 | intent.putExtra("pluginPath", pluginPath)
48 | intent.putExtra("activityName", activityName)
49 | context.startActivity(intent)
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/ainterface/iplugin/IPluginActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.ainterface.iplugin
2 |
3 | import android.app.Activity
4 | import android.os.Bundle
5 |
6 | interface IPluginActivity {
7 | fun attach(proxyActivity: Activity)
8 | fun onCreate(savedInstanceState: Bundle?)
9 | fun onStart()
10 | fun onResume()
11 | fun onPause()
12 | fun onStop()
13 | fun onDestroy()
14 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/hook/HookStubActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.hook
2 |
3 | import android.app.Activity
4 | import android.os.Bundle
5 |
6 | class HookStubActivity : Activity() {
7 | override fun onCreate(savedInstanceState: Bundle?) {
8 | super.onCreate(savedInstanceState)
9 | }
10 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/hook/ReflectException.java:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.hook;
2 |
3 | /**
4 | * @author Lody
5 | */
6 | public class ReflectException extends RuntimeException {
7 |
8 | public ReflectException(String message, Throwable cause) {
9 | super(message, cause);
10 | }
11 |
12 | public ReflectException(Throwable cause) {
13 | super(cause);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/reflect/ReflectActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.reflect
2 |
3 | import android.app.Activity
4 | import android.os.Bundle
5 | import java.lang.reflect.Method
6 |
7 | class ReflectActivity(activity: String, activityClassLoader: ClassLoader?) {
8 | private var clazz: Class = activityClassLoader?.loadClass(activity) as Class
9 | private var activity: Activity = clazz.newInstance()
10 |
11 | fun attach(proxyActivity: Activity?) {
12 | getMethod("attach", Activity::class.java).invoke(activity, proxyActivity)
13 | }
14 |
15 | fun onCreate(savedInstanceState: Bundle?) {
16 | getMethod("onCreate", Bundle::class.java).invoke(activity, savedInstanceState)
17 | }
18 |
19 | fun onStart() {
20 | getMethod("onStart").invoke(activity)
21 | }
22 |
23 | fun onResume() {
24 | getMethod("onResume").invoke(activity)
25 | }
26 |
27 | fun onPause() {
28 | getMethod("onPause").invoke(activity)
29 | }
30 |
31 | fun onStop() {
32 | getMethod("onStop").invoke(activity)
33 | }
34 |
35 | fun onDestroy() {
36 | getMethod("onDestroy").invoke(activity)
37 | }
38 |
39 | fun getMethod(methodName: String, vararg params: Class<*>): Method {
40 | return clazz.getMethod(methodName, *params)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/activity/reflect/StubReflectActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.reflect
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.os.Bundle
6 | import com.zy.commontec.activity.StubBaseActivity
7 |
8 | class StubReflectActivity : StubBaseActivity() {
9 | private var reflectActivity: ReflectActivity? = null
10 |
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 | reflectActivity = ReflectActivity(activityName, activityClassLoader)
14 | reflectActivity?.attach(this)
15 | reflectActivity?.onCreate(savedInstanceState)
16 | }
17 |
18 | override fun onStart() {
19 | super.onStart()
20 | reflectActivity?.onStart()
21 | }
22 |
23 | override fun onResume() {
24 | super.onResume()
25 | reflectActivity?.onResume()
26 | }
27 |
28 | override fun onPause() {
29 | super.onPause()
30 | reflectActivity?.onPause()
31 | }
32 |
33 | override fun onStop() {
34 | super.onStop()
35 | reflectActivity?.onStop()
36 | }
37 |
38 | override fun onDestroy() {
39 | super.onDestroy()
40 | reflectActivity?.onDestroy()
41 | }
42 |
43 | companion object {
44 | fun startPluginActivity(context: Context, pluginPath: String, activityName: String) {
45 | val intent = Intent(context, StubReflectActivity::class.java)
46 | intent.putExtra("pluginPath", pluginPath)
47 | intent.putExtra("activityName", activityName)
48 | context.startActivity(intent)
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/broadcast/BroadcastUtils.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.broadcast
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.IntentFilter
6 |
7 | class BroadcastUtils {
8 | companion object {
9 | private val broadcastMap = HashMap()
10 |
11 | fun registerBroadcastReceiver(context: Context, classLoader: ClassLoader, action: String, broadcastName: String) {
12 | val receiver = classLoader.loadClass(broadcastName).newInstance() as BroadcastReceiver
13 | val intentFilter = IntentFilter(action)
14 | context.registerReceiver(receiver, intentFilter)
15 | broadcastMap[action] = receiver
16 | }
17 |
18 | fun unregisterBroadcastReceiver(context: Context, action: String) {
19 | val receiver = broadcastMap.remove(action)
20 | context.unregisterReceiver(receiver)
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/contentprovider/PluginUtils.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.contentprovider
2 |
3 | class PluginUtils {
4 | companion object {
5 | var classLoader: ClassLoader? = null
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/java/com/zy/commontec/service/StubService.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.service
2 |
3 | import android.app.Service
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.os.IBinder
7 |
8 | class StubService : Service() {
9 | var serviceName: String? = null
10 | var pluginService: Service? = null
11 |
12 | companion object {
13 | var pluginClassLoader: ClassLoader? = null
14 | fun startService(context: Context, classLoader: ClassLoader, serviceName: String) {
15 | pluginClassLoader = classLoader
16 | val intent = Intent(context, StubService::class.java)
17 | intent.putExtra("serviceName", serviceName)
18 | context.startService(intent)
19 | }
20 | }
21 |
22 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
23 | val res = super.onStartCommand(intent, flags, startId)
24 | serviceName = intent?.getStringExtra("serviceName")
25 | pluginService = pluginClassLoader?.loadClass(serviceName)?.newInstance() as Service
26 | pluginService?.onCreate()
27 | return pluginService?.onStartCommand(intent, flags, startId) ?: res
28 | }
29 |
30 | override fun onDestroy() {
31 | super.onDestroy()
32 | pluginService?.onDestroy()
33 | }
34 |
35 | override fun onBind(intent: Intent?): IBinder? {
36 | return null
37 | }
38 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CommonTec
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/app/src/test/java/com/zy/commontec/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | android {
6 | compileSdkVersion 28
7 | buildToolsVersion "29.0.1"
8 |
9 | defaultConfig {
10 | applicationId "com.zy.architecture"
11 | minSdkVersion 19
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | dataBinding {
27 | enabled true
28 | }
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 |
34 | implementation 'com.android.support:appcompat-v7:28.0.0'
35 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
36 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
37 | }
38 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/androidTest/java/com/zy/architecture/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.architecture;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
23 |
24 | assertEquals("com.zy.architecture", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 | import android.support.v4.app.Fragment
6 | import com.zy.architecture.mvc.MVCFragment
7 | import com.zy.architecture.mvp.MVPFragment
8 | import com.zy.architecture.mvvm.MVVMFragment
9 | import kotlinx.android.synthetic.main.activity_main.*
10 |
11 | class MainActivity : AppCompatActivity() {
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_main)
16 | init()
17 | }
18 |
19 | private fun init() {
20 | changeFragment(NormalFragment.newInstance())
21 | normalText.setOnClickListener {
22 | changeFragment(NormalFragment.newInstance())
23 | }
24 | mvcText.setOnClickListener {
25 | changeFragment(MVCFragment.newInstance())
26 | }
27 | mvpText.setOnClickListener {
28 | changeFragment(MVPFragment.newInstance())
29 | }
30 | mvvmText.setOnClickListener {
31 | changeFragment(MVVMFragment.newInstance())
32 | }
33 | }
34 |
35 | private fun changeFragment(fragment: Fragment) {
36 | supportFragmentManager.beginTransaction().replace(R.id.framelayout, fragment).commit()
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/NormalFragment.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture
2 |
3 | import android.os.Bundle
4 | import android.os.Handler
5 | import android.support.v4.app.Fragment
6 | import android.text.Editable
7 | import android.text.TextUtils
8 | import android.text.TextWatcher
9 | import android.view.LayoutInflater
10 | import android.view.View
11 | import android.view.ViewGroup
12 | import kotlinx.android.synthetic.main.architecture.*
13 |
14 | /**
15 | * Created by zhangyi on 2019-09-14
16 | */
17 |
18 | class NormalFragment : Fragment() {
19 | companion object {
20 | fun newInstance(): Fragment {
21 | return NormalFragment()
22 | }
23 | }
24 | private val handler: Handler = Handler()
25 |
26 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
27 | return inflater.inflate(R.layout.architecture, container, false)
28 | }
29 |
30 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
31 | super.onViewCreated(view, savedInstanceState)
32 | titleText.text = "NORMAL"
33 | edit.addTextChangedListener(object : TextWatcher {
34 | override fun afterTextChanged(s: Editable?) {
35 | handleData(s.toString())
36 | }
37 |
38 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
39 | }
40 |
41 | override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
42 | }
43 | })
44 | clearText.setOnClickListener {
45 | edit.setText("")
46 | }
47 | }
48 |
49 | private fun handleData(data: String) {
50 | if (TextUtils.isEmpty(data)) {
51 | msgText.text = "default msg"
52 | return
53 | }
54 | msgText.text = "handle data ..."
55 | handler.removeCallbacksAndMessages(null)
56 | // 延迟来模拟网络或者磁盘操作
57 | handler.postDelayed({
58 | msgText.text = "handled data: $data"
59 | }, 3000)
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvc/Controller.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvc
2 |
3 | /**
4 | * Created by zhangyi on 2019-09-14
5 | */
6 |
7 | class HandleController : IController {
8 | private var model: IModel? = null
9 |
10 | override fun onDataChanged(data: String) {
11 | model?.handleData(data)
12 | }
13 |
14 | override fun clearData() {
15 | model?.clearData()
16 | }
17 |
18 | override fun setModel(model: IModel) {
19 | }
20 | }
21 |
22 | interface IController {
23 | fun setModel(model: IModel)
24 | fun onDataChanged(data: String)
25 | fun clearData()
26 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvc/Model.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvc
2 |
3 | import android.os.Handler
4 | import android.os.Looper
5 | import android.text.TextUtils
6 |
7 | /**
8 | * Created by zhangyi on 2019-09-14
9 | */
10 |
11 | class HandleModel : IModel {
12 | private var view: IView? = null
13 | private val handler: Handler = Handler(Looper.getMainLooper())
14 |
15 | override fun setView(view: IView) {
16 | this.view = view
17 | }
18 |
19 | override fun handleData(data: String) {
20 | if (TextUtils.isEmpty(data)) {
21 | return
22 | }
23 | view?.dataHanding()
24 | handler.removeCallbacksAndMessages(null)
25 | // 延迟来模拟网络或者磁盘操作
26 | handler.postDelayed({
27 | view?.onDataHandled("handled data: $data")
28 | }, 3000)
29 | }
30 |
31 | override fun clearData() {
32 | handler.removeCallbacksAndMessages(null)
33 | view?.onDataHandled("")
34 | }
35 | }
36 |
37 | interface IModel {
38 | fun setView(view: IView)
39 | fun handleData(data: String)
40 | fun clearData()
41 | }
42 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvc/View.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvc
2 |
3 | /**
4 | * Created by zhangyi on 2019-09-14
5 | */
6 |
7 | interface IView {
8 | fun setController(controller: IController)
9 | fun dataHanding()
10 | fun onDataHandled(data: String)
11 | }
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvp/Model.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvp
2 |
3 | import android.os.Handler
4 | import android.os.Looper
5 | import android.text.TextUtils
6 |
7 | /**
8 | * Created by zhangyi on 2019-09-14
9 | */
10 |
11 | class HandleModel : IModel {
12 | private var presenter: IPresenter? = null
13 | private var handler = Handler(Looper.getMainLooper())
14 |
15 | override fun handleData(data: String) {
16 | if (TextUtils.isEmpty(data)) {
17 | return
18 | }
19 | handler.removeCallbacksAndMessages(null)
20 | // 延迟来模拟网络或者磁盘操作
21 | handler.postDelayed({
22 | presenter?.dataHandled("handled data: $data")
23 | }, 3000)
24 | }
25 |
26 | override fun clearData() {
27 | handler.removeCallbacksAndMessages(null)
28 | presenter?.dataCleared()
29 | }
30 |
31 | override fun setPresenter(presenter: IPresenter) {
32 | this.presenter = presenter
33 | }
34 |
35 | }
36 |
37 | interface IModel {
38 | fun setPresenter(presenter: IPresenter)
39 | fun handleData(data: String)
40 | fun clearData()
41 | }
42 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvp/Presenter.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvp
2 |
3 | /**
4 | * Created by zhangyi on 2019-09-15
5 | */
6 |
7 | interface IPresenter {
8 | fun setView(view: IView)
9 | fun setModel(model: IModel)
10 | fun dataHandled(data: String)
11 | fun dataCleared()
12 | fun onTextChanged(text: String)
13 | fun onClearBtnClicked()
14 | }
15 |
16 | class Presenter : IPresenter {
17 | private var model: IModel? = null
18 | private var view: IView? = null
19 |
20 | override fun setModel(model: IModel) {
21 | this.model = model
22 | }
23 |
24 | override fun setView(view: IView) {
25 | this.view = view
26 | }
27 |
28 | override fun dataHandled(data: String) {
29 | view?.showData(data)
30 | }
31 |
32 | override fun dataCleared() {
33 | view?.showData("")
34 | }
35 |
36 | override fun onTextChanged(text: String) {
37 | view?.loading()
38 | model?.handleData(text)
39 | }
40 |
41 | override fun onClearBtnClicked() {
42 | model?.clearData()
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvp/View.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvp
2 |
3 | /**
4 | * Created by zhangyi on 2019-09-15
5 | */
6 |
7 | interface IView {
8 | fun setPresenter(presenter: IPresenter)
9 | fun loading()
10 | fun showData(data: String)
11 | }
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvvm/MVVMFragment.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvvm
2 |
3 | import android.databinding.DataBindingUtil
4 | import android.os.Bundle
5 | import android.support.v4.app.Fragment
6 | import android.view.LayoutInflater
7 | import android.view.View
8 | import android.view.ViewGroup
9 | import com.zy.architecture.R
10 | import com.zy.architecture.databinding.ArchitectureBindingBinding
11 |
12 | /**
13 | * Created by zhangyi on 2019-09-14
14 | */
15 |
16 | class MVVMFragment : Fragment() {
17 | companion object {
18 | fun newInstance(): Fragment {
19 | return MVVMFragment()
20 | }
21 | }
22 |
23 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
24 | var binding: ArchitectureBindingBinding = DataBindingUtil.inflate(inflater, R.layout.architecture_binding, container, false)
25 | binding.lifecycleOwner = this
26 | val viewModel = ViewModel()
27 | viewModel.setModel(HandleModel())
28 | binding.viewmodel = viewModel
29 | return binding.root
30 | }
31 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvvm/Model.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvvm
2 |
3 | import android.os.Handler
4 | import android.os.Looper
5 | import android.text.TextUtils
6 |
7 | /**
8 | * Created by zhangyi on 19-9-17
9 | */
10 |
11 | class HandleModel : IModel {
12 | private var viewModel: IViewModel? = null
13 | private var handler = Handler(Looper.getMainLooper())
14 |
15 | override fun handleData(data: String?) {
16 | if (TextUtils.isEmpty(data)) {
17 | return
18 | }
19 | handler.removeCallbacksAndMessages(null)
20 | // 延迟来模拟网络或者磁盘操作
21 | handler.postDelayed({
22 | viewModel?.dataHandled("handled data: $data")
23 | }, 3000)
24 | }
25 |
26 | override fun clearData() {
27 | handler.removeCallbacksAndMessages(null)
28 | viewModel?.dataCleared()
29 | }
30 |
31 | override fun setViewModel(viewModel: IViewModel) {
32 | this.viewModel = viewModel
33 | }
34 | }
35 |
36 | interface IModel {
37 | fun setViewModel(viewModel: IViewModel)
38 | fun handleData(data: String?)
39 | fun clearData()
40 | }
41 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvvm/View.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvvm
2 |
3 | /**
4 | * Created by zhangyi on 19-9-17
5 | */
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/java/com/zy/architecture/mvvm/ViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.zy.architecture.mvvm
2 |
3 | import android.arch.lifecycle.MutableLiveData
4 | import android.os.Handler
5 | import android.os.Looper
6 | import android.text.TextUtils
7 |
8 | /**
9 | * Created by zhangyi on 19-9-17
10 | */
11 |
12 | interface IViewModel {
13 | fun setModel(model: IModel)
14 | fun handleText(text: String?)
15 | fun clearData()
16 | fun dataHandled(data: String?)
17 | fun dataCleared()
18 | }
19 |
20 | class ViewModel : IViewModel {
21 | private var model: IModel? = null
22 | var inputText: MutableLiveData = MutableLiveData()
23 | var handledText: MutableLiveData = MutableLiveData()
24 |
25 | init {
26 | inputText.observeForever {
27 | handleText(it)
28 | }
29 | handledText.value = "default msg"
30 | }
31 |
32 | override fun handleText(text: String?) {
33 | if (TextUtils.isEmpty(text)) {
34 | handledText.value = "default msg"
35 | return
36 | }
37 | handledText.value = "handle data ..."
38 | model?.handleData(text)
39 | }
40 |
41 | override fun clearData() {
42 | model?.clearData()
43 | }
44 |
45 | override fun setModel(model: IModel) {
46 | this.model = model
47 | model.setViewModel(this)
48 | }
49 |
50 | override fun dataHandled(data: String?) {
51 | handledText.value = data
52 | }
53 |
54 | override fun dataCleared() {
55 | inputText.value = ""
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/layout/architecture.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
22 |
23 |
30 |
31 |
40 |
41 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/layout/architecture_binding.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
10 |
11 |
12 |
18 |
19 |
24 |
25 |
31 |
32 |
39 |
40 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/architecture/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | architecture
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/architecture/src/test/java/com/zy/architecture/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.architecture;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.3.31'
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.4.0'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/dynamic_feature/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/dynamic_feature/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.dynamic-feature'
2 |
3 | android {
4 | compileSdkVersion 28
5 |
6 | defaultConfig {
7 | minSdkVersion 19
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 |
12 |
13 | }
14 |
15 |
16 | }
17 |
18 | dependencies {
19 | implementation fileTree(dir: 'libs', include: ['*.jar'])
20 | implementation project(':simpleapk')
21 | }
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/dynamic_feature/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # Kotlin code style for this project: "official" or "obsolete":
15 | kotlin.code.style=official
16 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/common-tec/CommonTec/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jun 22 16:59:35 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Sets the minimum version of CMake required to build your native library.
2 | # This ensures that a certain set of CMake features is available to
3 | # your build.
4 |
5 | cmake_minimum_required(VERSION 3.4.1)
6 |
7 | # Specifies a library name, specifies whether the library is STATIC or
8 | # SHARED, and provides relative paths to the source code. You can
9 | # define multiple libraries by adding multiple add.library() commands,
10 | # and CMake builds them for you. When you build your app, Gradle
11 | # automatically packages shared libraries with your APK.
12 |
13 | add_library( # Specifies the name of the library.
14 | native-hook
15 |
16 | # Sets the library as a shared library.
17 | SHARED
18 |
19 | # Provides a relative path to your source file(s).
20 | src/main/cpp/native-hook.cpp )
21 |
22 | include_directories(src/main/cpp/)
23 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/androidTest/java/com/zy/hotfix/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.hotfix", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/assets/patch.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/assets/patch.apk
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/cpp/native-hook.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Created by zy on 2019-07-21.
3 | //
4 |
5 | #include
6 | #include "art_7_0.h"
7 | extern "C"
8 | JNIEXPORT void JNICALL
9 | Java_com_zy_hotfix_native_1hook_NativeHookUtils_patch(JNIEnv* env, jobject clazz, jobject src, jobject dest) {
10 | art::mirror::ArtMethod* smeth =
11 | (art::mirror::ArtMethod*) env->FromReflectedMethod(src);
12 |
13 | art::mirror::ArtMethod* dmeth =
14 | (art::mirror::ArtMethod*) env->FromReflectedMethod(dest);
15 |
16 | reinterpret_cast(dmeth->declaring_class_)->clinit_thread_id_ =
17 | reinterpret_cast(smeth->declaring_class_)->clinit_thread_id_;
18 | reinterpret_cast(dmeth->declaring_class_)->status_ =
19 | static_cast(reinterpret_cast(smeth->declaring_class_)->status_ -1);
20 | //for reflection invoke
21 | reinterpret_cast(dmeth->declaring_class_)->super_class_ = 0;
22 |
23 | smeth->declaring_class_ = dmeth->declaring_class_;
24 | smeth->access_flags_ = dmeth->access_flags_ | 0x0001;
25 | smeth->dex_code_item_offset_ = dmeth->dex_code_item_offset_;
26 | smeth->dex_method_index_ = dmeth->dex_method_index_;
27 | smeth->method_index_ = dmeth->method_index_;
28 | smeth->hotness_count_ = dmeth->hotness_count_;
29 |
30 | smeth->ptr_sized_fields_.dex_cache_resolved_methods_ =
31 | dmeth->ptr_sized_fields_.dex_cache_resolved_methods_;
32 | smeth->ptr_sized_fields_.dex_cache_resolved_types_ =
33 | dmeth->ptr_sized_fields_.dex_cache_resolved_types_;
34 |
35 | smeth->ptr_sized_fields_.entry_point_from_jni_ =
36 | dmeth->ptr_sized_fields_.entry_point_from_jni_;
37 | smeth->ptr_sized_fields_.entry_point_from_quick_compiled_code_ =
38 | dmeth->ptr_sized_fields_.entry_point_from_quick_compiled_code_;
39 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/java/com/zy/hotfix/HotfixUtils.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix;
2 |
3 | import android.content.Context;
4 | import android.widget.Toast;
5 |
6 | public class HotfixUtils {
7 | public void toast(Context context) {
8 | Toast.makeText(context, "hotfix message", Toast.LENGTH_SHORT).show();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/java/com/zy/hotfix/PatchActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix
2 |
3 | import android.app.Activity
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.os.Bundle
7 | import kotlinx.android.synthetic.main.activity_patch.*
8 |
9 | class PatchActivity : Activity() {
10 | companion object {
11 | fun start(context: Context) {
12 | val intent = Intent(context, PatchActivity::class.java)
13 | context.startActivity(intent)
14 | }
15 | }
16 |
17 | override fun onCreate(savedInstanceState: Bundle?) {
18 | super.onCreate(savedInstanceState)
19 | setContentView(R.layout.activity_patch)
20 | text.setOnClickListener {
21 | val utils = HotfixUtils()
22 | utils.toast(this)
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/java/com/zy/hotfix/instant_run/PatchRedirect.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.instant_run;
2 |
3 | public abstract class PatchRedirect {
4 | public abstract Object invokePatchMethod(String methodName, Object... params);
5 | public abstract boolean needPatch(String methodName);
6 | }
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/java/com/zy/hotfix/native_hook/NativeHookUtils.kt:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.native_hook
2 |
3 | import java.lang.reflect.Method
4 |
5 | class NativeHookUtils {
6 | companion object {
7 | init {
8 | System.loadLibrary("native-hook")
9 | }
10 | }
11 |
12 | external fun patch(fromMethod: Method, toMethod: Method)
13 |
14 |
15 | fun getMsg(): String {
16 | return "from hotfix"
17 | }
18 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/java/com/zy/hotfix/utils/ReflectException.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.utils;
2 |
3 | /**
4 | * @author Lody
5 | */
6 | public class ReflectException extends RuntimeException {
7 |
8 | public ReflectException(String message, Throwable cause) {
9 | super(message, cause);
10 | }
11 |
12 | public ReflectException(Throwable cause) {
13 | super(cause);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/layout/activity_patch.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/hotfix/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | hotfix
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/hotfix/src/test/java/com/zy/hotfix/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | android {
6 | compileSdkVersion 28
7 | buildToolsVersion "29.0.1"
8 |
9 |
10 | defaultConfig {
11 | applicationId "com.zy.myview"
12 | minSdkVersion 19
13 | targetSdkVersion 28
14 | versionCode 1
15 | versionName "1.0"
16 |
17 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
18 |
19 | }
20 |
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 |
28 | }
29 |
30 | dependencies {
31 | implementation fileTree(dir: 'libs', include: ['*.jar'])
32 |
33 | implementation 'com.android.support:appcompat-v7:28.0.0'
34 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35 | }
36 | repositories {
37 | mavenCentral()
38 | }
39 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/androidTest/java/com/zy/myview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.myview;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.myview", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/java/com/zy/myview/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.zy.myview;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/java/com/zy/myview/MyView.kt:
--------------------------------------------------------------------------------
1 | package com.zy.myview
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.widget.TextView
6 |
7 | class MyView constructor(context: Context?, attributes: AttributeSet?, defaultAttrStyle: Int) : TextView(context, attributes, defaultAttrStyle) {
8 | constructor(context: Context?, attributes: AttributeSet?) : this(context, attributes, 0)
9 | constructor(context: Context?) : this(context, null)
10 |
11 | init {
12 | val typedArray = context?.obtainStyledAttributes(attributes, R.styleable.MyView)
13 | val message = typedArray?.getString(R.styleable.MyView_message)
14 | typedArray?.recycle() //注意回收
15 | }
16 |
17 | override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
18 | super.onMeasure(widthMeasureSpec, heightMeasureSpec)
19 | setMeasuredDimension(100, 100)
20 | }
21 |
22 | override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
23 | setFrame(0, 0, 100, 20)
24 | super.onLayout(changed, 0, 0, 100, 20)
25 | }
26 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/java/com/zy/myview/VolumeView.kt:
--------------------------------------------------------------------------------
1 | package com.zy.myview
2 |
3 | import android.content.Context
4 | import android.graphics.Canvas
5 | import android.graphics.Paint
6 | import android.util.AttributeSet
7 | import android.view.View
8 |
9 | class VolumeView constructor(context: Context?, attributes: AttributeSet?, defaultAttrStyle: Int) : View(context, attributes, defaultAttrStyle) {
10 | val DEFAULT_LENGTH = 50
11 | var color: Int = 0
12 | var full: Boolean = false
13 | var paint: Paint = Paint()
14 |
15 | constructor(context: Context?, attributes: AttributeSet?) : this(context, attributes, 0)
16 | constructor(context: Context?) : this(context, null)
17 |
18 | override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
19 | val height = MeasureSpec.getSize(heightMeasureSpec)
20 | setMeasuredDimension(height / 5, height)
21 | }
22 |
23 | override fun onDraw(canvas: Canvas) {
24 | super.onDraw(canvas)
25 | color = if (color > 0) color else context.resources.getColor(R.color.colorPrimary)
26 | paint.isAntiAlias = true
27 | paint.color = color
28 | if (full) {
29 | paint.style = Paint.Style.FILL
30 | } else {
31 | paint.style = Paint.Style.STROKE
32 | }
33 | canvas.drawRect(0f, 0f, width.toFloat(), height.toFloat(), paint)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/myview/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | myview
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/myview/src/test/java/com/zy/myview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.myview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 | apply plugin: 'kotlin-android-extensions'
5 |
6 | android {
7 | compileSdkVersion 28
8 | buildToolsVersion "29.0.1"
9 |
10 |
11 | defaultConfig {
12 | applicationId "com.zy.patch"
13 | minSdkVersion 19
14 | targetSdkVersion 28
15 | versionCode 1
16 | versionName "1.0"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | implementation 'com.android.support:appcompat-v7:28.0.0'
32 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
33 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
34 | }
35 |
36 |
37 | project.afterEvaluate {
38 | project.tasks.each {
39 | if (it.name == "assembleDebug") {
40 | it.doLast {
41 | copy {
42 | from new File(project.getBuildDir(), 'outputs/apk/debug/patch-debug.apk').absolutePath
43 | into new File(project.getRootProject().getProjectDir(), 'hotfix/src/main/assets')
44 | rename 'patch-debug.apk', 'patch.apk'
45 | }
46 | }
47 | }
48 | }
49 | }
50 | repositories {
51 | mavenCentral()
52 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/androidTest/java/com/zy/patch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.patch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.patch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/hotfix/HotfixUtils.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix;
2 |
3 | import android.content.Context;
4 | import android.widget.Toast;
5 |
6 | public class HotfixUtils {
7 | public void toast(Context context) {
8 | Toast.makeText(context, "fixed message", Toast.LENGTH_SHORT).show();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/hotfix/instant_run/InstantRunUtilsRedirect.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.instant_run;
2 |
3 | public class InstantRunUtilsRedirect extends PatchRedirect {
4 | @Override
5 | public Object invokePatchMethod(String methodName, Object... params) {
6 | if (methodName.equals("getValue")) {
7 | return getValue();
8 | }
9 | return null;
10 | }
11 |
12 | @Override
13 | public boolean needPatch(String methodName) {
14 | if ("getValue".equals(methodName)) {
15 | return true;
16 | }
17 | return false;
18 | }
19 |
20 | public int getValue() {
21 | return 200;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/hotfix/instant_run/PatchInfo.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.instant_run;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | public class PatchInfo {
7 | public static Map patchMap = new HashMap<>();
8 | public static void init() {
9 | patchMap.put("com.zy.hotfix.instant_run.InstantRunUtils", new InstantRunUtilsRedirect());
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/hotfix/instant_run/PatchRedirect.java:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.instant_run;
2 |
3 | public abstract class PatchRedirect {
4 | public abstract Object invokePatchMethod(String methodName, Object... params);
5 | public abstract boolean needPatch(String methodName);
6 | }
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/hotfix/native_hook/PatchNativeHookUtils.kt:
--------------------------------------------------------------------------------
1 | package com.zy.hotfix.native_hook
2 |
3 | class PatchNativeHookUtils {
4 | fun getMsg(): String {
5 | return "from patch"
6 | }
7 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/java/com/zy/patch/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.zy.patch;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/layout/activity_patch.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/patch/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | patch
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/patch/src/test/java/com/zy/patch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.patch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | android {
6 | compileSdkVersion 26
7 |
8 | defaultConfig {
9 | applicationId "com.zy.plugin"
10 | minSdkVersion 19
11 | targetSdkVersion 26
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | implementation 'com.android.support:appcompat-v7:26.0.0'
32 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
33 | testImplementation 'junit:junit:4.12'
34 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
35 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
36 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
37 | }
38 | repositories {
39 | mavenCentral()
40 | }
41 |
42 | project.afterEvaluate {
43 | project.tasks.each {
44 | if (it.name == "assembleDebug") {
45 | it.doLast {
46 | copy {
47 | from new File(project.getBuildDir(), 'outputs/apk/debug/plugin-debug.apk').absolutePath
48 | into new File(project.getRootProject().getProjectDir(), 'app/src/main/assets')
49 | rename 'plugin-debug.apk', 'plugin.apk'
50 | }
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/androidTest/java/com/zy/plugin/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.plugin;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.plugin", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/java/com/zy/commontec/activity/ainterface/iplugin/IPluginActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.commontec.activity.ainterface.iplugin
2 |
3 | import android.app.Activity
4 | import android.os.Bundle
5 |
6 | interface IPluginActivity {
7 | fun attach(proxyActivity: Activity)
8 | fun onCreate(savedInstanceState: Bundle?)
9 | fun onStart()
10 | fun onResume()
11 | fun onPause()
12 | fun onStop()
13 | fun onDestroy()
14 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/java/com/zy/plugin/Logger.kt:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import android.util.Log
4 |
5 | class Logger {
6 | companion object {
7 | private const val TAG = "COMMON_TEC"
8 | fun d (msg: String) {
9 | Log.d(TAG, msg)
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/java/com/zy/plugin/PluginActivity.kt:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import android.os.Bundle
4 | import com.zy.commontec.activity.ainterface.iplugin.BasePluginActivity
5 |
6 | class PluginActivity : BasePluginActivity() {
7 | override fun onCreate(savedInstanceState: Bundle?) {
8 | super.onCreate(savedInstanceState)
9 | // val textView = TextView(this)
10 | // textView.text = "aaa"
11 | // setContentView(textView)
12 | setContentView(R.layout.activity_main)
13 | }
14 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/java/com/zy/plugin/PluginBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 |
7 | class PluginBroadcastReceiver: BroadcastReceiver() {
8 | override fun onReceive(context: Context?, intent: Intent?) {
9 | Logger.d("receive broadcast in plugin")
10 | }
11 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/java/com/zy/plugin/PluginService.kt:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import android.app.Service
4 | import android.content.Intent
5 | import android.os.IBinder
6 |
7 | class PluginService : Service() {
8 |
9 | override fun onCreate() {
10 | Logger.d("plugin onCreate")
11 | super.onCreate()
12 | }
13 |
14 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
15 | Logger.d("plugin onStartCommand")
16 | return super.onStartCommand(intent, flags, startId)
17 | }
18 |
19 | override fun onDestroy() {
20 | Logger.d("plugin onDestory")
21 | super.onDestroy()
22 | }
23 |
24 | override fun onBind(intent: Intent?): IBinder? {
25 | return null
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/plugin/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Plugin
3 |
4 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/plugin/src/test/java/com/zy/plugin/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.plugin;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/CommonTec/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':plugin', ':hotfix', ':patch', ':myview', ':simpleapk', ':dynamic_feature', ':architecture'
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/androidTest/java/com/zy/simpleapk/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.simpleapk;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.simpleapk", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/java/com/zy/simpleapk/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.zy.simpleapk;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 |
7 | public class MainActivity extends Activity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | Log.d("aaa", "aaa");
13 | setContentView(R.layout.activity_main);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/CommonTec/simpleapk/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SimpleApk
3 | Module Title
4 |
5 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/common-tec/CommonTec/simpleapk/src/test/java/com/zy/simpleapk/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.simpleapk;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/common-tec/images/architecture/mvc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/mvc.png
--------------------------------------------------------------------------------
/common-tec/images/architecture/mvp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/mvp.png
--------------------------------------------------------------------------------
/common-tec/images/architecture/mvvm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/mvvm.png
--------------------------------------------------------------------------------
/common-tec/images/architecture/pro.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/pro.gif
--------------------------------------------------------------------------------
/common-tec/images/architecture/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/summary.png
--------------------------------------------------------------------------------
/common-tec/images/architecture/summary1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/architecture/summary1.png
--------------------------------------------------------------------------------
/common-tec/images/classloader/classloader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/classloader/classloader.png
--------------------------------------------------------------------------------
/common-tec/images/classloader/classloader_invoke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/classloader/classloader_invoke.png
--------------------------------------------------------------------------------
/common-tec/images/classloader/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/classloader/summary.png
--------------------------------------------------------------------------------
/common-tec/images/classloader/summary1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/classloader/summary1.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/class_method.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/class_method.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/classloader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/classloader.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/insert_dex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/insert_dex.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/insert_dex2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/insert_dex2.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/instant_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/instant_run.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/native_hook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/native_hook.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/summary.png
--------------------------------------------------------------------------------
/common-tec/images/hotfix/summary2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/hotfix/summary2.png
--------------------------------------------------------------------------------
/common-tec/images/myview/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/myview/summary.png
--------------------------------------------------------------------------------
/common-tec/images/myview/summary2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/myview/summary2.png
--------------------------------------------------------------------------------
/common-tec/images/myview/view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/myview/view.png
--------------------------------------------------------------------------------
/common-tec/images/myview/vol.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/myview/vol.gif
--------------------------------------------------------------------------------
/common-tec/images/package/aab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/aab.png
--------------------------------------------------------------------------------
/common-tec/images/package/android_build_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/android_build_detail.png
--------------------------------------------------------------------------------
/common-tec/images/package/app-bundle-structure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/app-bundle-structure.png
--------------------------------------------------------------------------------
/common-tec/images/package/app-bundle.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/app-bundle.gif
--------------------------------------------------------------------------------
/common-tec/images/package/bundle-apks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/bundle-apks.png
--------------------------------------------------------------------------------
/common-tec/images/package/feature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/feature.png
--------------------------------------------------------------------------------
/common-tec/images/package/file-apk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/file-apk.png
--------------------------------------------------------------------------------
/common-tec/images/package/instant-run-splits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/instant-run-splits.png
--------------------------------------------------------------------------------
/common-tec/images/package/multiple-apk-compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/multiple-apk-compare.png
--------------------------------------------------------------------------------
/common-tec/images/package/multiple-apks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/multiple-apks.png
--------------------------------------------------------------------------------
/common-tec/images/package/run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/run.png
--------------------------------------------------------------------------------
/common-tec/images/package/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/summary.png
--------------------------------------------------------------------------------
/common-tec/images/package/summary2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/summary2.png
--------------------------------------------------------------------------------
/common-tec/images/package/v2-signing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/v2-signing.png
--------------------------------------------------------------------------------
/common-tec/images/package/v2-verify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/v2-verify.png
--------------------------------------------------------------------------------
/common-tec/images/package/zip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/package/zip.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/Instrumentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/Instrumentation.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/Instrumentation_hook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/Instrumentation_hook.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/hook_resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/hook_resources.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/plugin.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/proxy.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/proxy_resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/proxy_resources.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/resources.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/start_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/start_activity.png
--------------------------------------------------------------------------------
/common-tec/images/plugin/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/plugin/summary.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/binder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/binder.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/framework.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/framework.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/shadowActivity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/shadowActivity.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/startactivity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/startactivity.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/startactivity2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/startactivity2.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/summary.png
--------------------------------------------------------------------------------
/common-tec/images/shadow/summary2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/common-tec/images/shadow/summary2.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 |
6 | defaultConfig {
7 | applicationId "com.zy.android_gradle_plugin_source"
8 | minSdkVersion 19
9 | targetSdkVersion 26
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 |
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | }
22 |
23 | dependencies {
24 | implementation fileTree(dir: 'libs', include: ['*.jar'])
25 | implementation 'com.android.support:appcompat-v7:26.1.0'
26 | // implementation 'com.android.tools.build:gradle:3.0.1'
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/androidTest/java/com/zy/android_gradle_plugin_source/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.android_gradle_plugin_source;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.android_gradle_plugin_source", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/java/com/zy/android_gradle_plugin_source/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.zy.android_gradle_plugin_source;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | android-gradle-plugin-source
3 |
4 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/android-gradle-plugin-source/src/test/java/com/zy/android_gradle_plugin_source/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.android_gradle_plugin_source;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/androidTest/java/com/zy/easygradle/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.easygradle;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.easygradle", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/java/com/zy/easygradle/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.zy.easygradle;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | ModuleApi api = new ModuleApi();
13 | api.api();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/java/com/zy/easygradle/ModuleApi.java:
--------------------------------------------------------------------------------
1 | package com.zy.easygradle;
2 |
3 | import com.zy.module1.Module1Api;
4 | //import com.zy.module2.Module2Api;
5 |
6 | /**
7 | * Created by zy on 2019/5/4.
8 | */
9 |
10 | public class ModuleApi {
11 | public void api() {
12 | Module1Api api = new Module1Api();
13 | api.api1();
14 | // Module2Api api2 = new Module2Api();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | EasyGradle
3 |
4 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/app/src/test/java/com/zy/easygradle/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.easygradle;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/EasyGradle/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 | mavenLocal()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.0.1'
11 | classpath 'com.zy.plugin:myplugin:0.0.1'
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | mavenLocal()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle-plugin/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle-plugin/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'groovy'
2 | apply plugin: 'java'
3 | apply plugin: 'maven'
4 |
5 | buildscript {
6 | repositories {
7 | mavenLocal()
8 | google()
9 | jcenter()
10 | }
11 | }
12 |
13 | repositories {
14 | mavenLocal()
15 | google()
16 | jcenter()
17 | }
18 |
19 | install {
20 | repositories.mavenInstaller {
21 | pom.version = '0.0.1'
22 | pom.artifactId = 'myplugin'
23 | pom.groupId = 'com.zy.plugin'
24 | }
25 | }
26 |
27 | dependencies {
28 | compile gradleApi()
29 | compile localGroovy()
30 | compile 'com.android.tools.build:gradle:3.0.1'
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle-plugin/src/main/groovy/com/zy/plugin/MyPlugin.groovy:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import org.gradle.api.Plugin
4 | import org.gradle.api.Project
5 |
6 | class MyPlugin implements Plugin {
7 |
8 | @Override
9 | void apply(Project project) {
10 | println("apply my plugin")
11 | project.tasks.create("mytask", MyTask.class)
12 | project.android.registerTransform(new MyTransform())
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle-plugin/src/main/groovy/com/zy/plugin/MyTask.groovy:
--------------------------------------------------------------------------------
1 | package com.zy.plugin
2 |
3 | import org.gradle.api.DefaultTask
4 | import org.gradle.api.tasks.TaskAction
5 |
6 | class MyTask extends DefaultTask {
7 |
8 | @TaskAction
9 | void action() {
10 | println('my task run')
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle-plugin/src/main/resources/META-INF/gradle-plugins/myplugin.properties:
--------------------------------------------------------------------------------
1 | implementation-class=com.zy.plugin.MyPlugin
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/EasyGradle/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/EasyGradle/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 28 00:37:24 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 26
5 |
6 | defaultConfig {
7 | minSdkVersion 19
8 | targetSdkVersion 26
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 |
20 | }
21 |
22 | dependencies {
23 | implementation fileTree(dir: 'libs', include: ['*.jar'])
24 | implementation 'com.android.support:appcompat-v7:26.1.0'
25 | implementation project(':module2')
26 | // api project(':module2')
27 | // compileOnly project(':module2')
28 | // runtimeOnly project(':module2')
29 | }
30 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/src/androidTest/java/com/zy/module1/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.module1;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.module1.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/src/main/java/com/zy/module1/Module1Api.java:
--------------------------------------------------------------------------------
1 | package com.zy.module1;
2 |
3 | import com.zy.module2.Module2Api;
4 |
5 | /**
6 | * Created by zy on 2019/5/4.
7 | */
8 |
9 | public class Module1Api {
10 | public void api1() {
11 | Module2Api api2 = new Module2Api();
12 | api2.api();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | module1
3 |
4 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module1/src/test/java/com/zy/module1/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.module1;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 26
5 |
6 | defaultConfig {
7 | minSdkVersion 19
8 | targetSdkVersion 26
9 | versionCode 1
10 | versionName "1.0"
11 |
12 | }
13 |
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | }
22 |
23 | dependencies {
24 | implementation fileTree(dir: 'libs', include: ['*.jar'])
25 |
26 | implementation 'com.android.support:appcompat-v7:26.1.0'
27 | }
28 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/src/androidTest/java/com/zy/module2/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.module2;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zy.module2.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/src/main/java/com/zy/module2/Module2Api.java:
--------------------------------------------------------------------------------
1 | package com.zy.module2;
2 |
3 | /**
4 | * Created by zy on 2019/5/4.
5 | */
6 |
7 | public class Module2Api {
8 | public void api() {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | module2
3 |
4 |
--------------------------------------------------------------------------------
/gradle/EasyGradle/module2/src/test/java/com/zy/module2/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zy.module2;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/EasyGradle/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':gradle-plugin', ':module1', ':module2', ':android-gradle-plugin-source'
2 |
--------------------------------------------------------------------------------
/gradle/gradle-summary.md:
--------------------------------------------------------------------------------
1 | ### 看完这一系列,彻底搞懂 Gradle
2 | 前面写了几篇关于 Gradle 的文章,这篇文章算是这一系列的结束和总结。
3 |
4 | ### Gradle 系列文章
5 | [【Android 修炼手册】Gradle 篇 -- Gradle 的基本使用](./gralde的基本使用.md)
6 | [【Android 修炼手册】Gradle 篇 -- Android Gradle Plugin 插件主要流程](./android_gradle_plugin-主要流程分析.md)
7 | [【Android 修炼手册】Gradle 篇 -- Android Gradle Plugin 主要 Task 分析](./android_gradle_plugin-主要task分析.md)
8 | [【Android 修炼手册】Gradle 篇 -- Gradle 源码分析](./gradle源码分析.md)
9 | [动画讲解 Gradle 原理](https://www.bilibili.com/video/av55941638/)
10 |
11 | ### 关于 Gradle
12 | 相对于 Android 开发者来说,包括最开始的我,可能对 Gradle 的认识,就是一个打包工具而已,平时主要在做 app 的开发,对于 Gradle 的投入并不是很多。但真正深入了解以后,会发现 Gradle 能做的事情很多。而对 Android Gradle Plugin 的学习,也会加深对 Android 的理解,其实有时候 Android 开发,并不只是做一款 App 而已。像我在最开始写一些小工具的时候,基本上都是用 python,后来学习了 Gradle 以后,可能会觉得 Gradle 用起来更顺手,更方便。学好 Gradle 对于后面进阶好处是大大大大大的。
13 |
14 | ### 一些尝试
15 | 之前写的文章逻辑,是按照从**使用到深入实现原理**来的,应该也符合一般的认知,也希望这一系列的文章,能帮助到一些想要学习 Gradle 的朋友。
16 | 其实在写文章的同时,也做了一些尝试,想通过更简洁明了的方式,把一些原理解释的更加清楚易懂,所以在文字过程中加了不少示意图,但是回过头来再去看,可能并没有我开始达到想要的效果。因为其中一些原理和实现,用示意图的方式来讲解,还是有些吃力。
17 | 这几天有了一个想法,想通过动画的形式来讲解源码。所以尝试做了一个 **Gradle 原理**的动画讲解。点击下面连接观看动画视频。(PS:整个视频没有声音,上班时间也可放心观看~)第一次做这类的动画,可能效果不是很好,如果有建议或意见,欢迎留言反馈~
18 | [动画讲解 Gradle 原理](https://www.bilibili.com/video/av55941638/)
19 |
20 | ### 欢迎关注下面账号,获取更新
21 | [微信搜索公众号: ZYLAB](./images/ZYLAB.jpg)
22 | [Github](https://github.com/5A59)
23 | [知乎](https://www.zhihu.com/people/5a59/activities)
24 | [掘金](https://juejin.im/user/58d9d015ac502e0058df1f96)
25 | [简书](https://www.jianshu.com/u/4cf10cf65326)
26 |
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/android-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/android-app.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/generateDebugBuildConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/generateDebugBuildConfig.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/mergeDebugResources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/mergeDebugResources.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/processDebugManifest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/processDebugManifest.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/processDebugResources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/processDebugResources.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/transformClassesWithDexBuilderForDebug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/transformClassesWithDexBuilderForDebug.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/transformDexArchiveWithDexMergerForDebug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/transformDexArchiveWithDexMergerForDebug.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin-task/transformDexArchiveWithExternalLibsDexMergerForDebug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin-task/transformDexArchiveWithExternalLibsDexMergerForDebug.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin-all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin-all.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin-summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin-summary.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin1.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin2.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin3.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin4.png
--------------------------------------------------------------------------------
/gradle/images/android-gradle-plugin/plugin5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/android-gradle-plugin/plugin5.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/configureBuild.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/configureBuild.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/constructTaskGraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/constructTaskGraph.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/finishBuild.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/finishBuild.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/gradle-source-all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/gradle-source-all.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/loadsettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/loadsettings.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/runTasks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/runTasks.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/script-class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/script-class.png
--------------------------------------------------------------------------------
/gradle/images/gradle-source/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-source/start.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/dependencies-api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/dependencies-api.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/dependencies-compileOnly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/dependencies-compileOnly.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/dependencies-implementation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/dependencies-implementation.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/dependencies-runtimeOnly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/dependencies-runtimeOnly.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/dependencies.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-api.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-compileOnly-apk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-compileOnly-apk.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-compileOnly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-compileOnly.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-implementation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-implementation.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-pipelining.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-pipelining.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-plugin-debug1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-plugin-debug1.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-plugin-debug2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-plugin-debug2.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-plugin-debug3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-plugin-debug3.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-plugin-debug4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-plugin-debug4.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-plugins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-plugins.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-project.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-runtimeOnly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-runtimeOnly.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle-use-summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle-use-summary.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle1.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle2.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle3.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle4.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle5.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle6.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle7.png
--------------------------------------------------------------------------------
/gradle/images/gradle-use/gradle8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/gradle/images/gradle-use/gradle8.png
--------------------------------------------------------------------------------
/images/ABOUT_ME.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/images/ABOUT_ME.png
--------------------------------------------------------------------------------
/images/ZYLAB.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/images/ZYLAB.jpg
--------------------------------------------------------------------------------
/interview/pic/handler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/interview/pic/handler.png
--------------------------------------------------------------------------------
/interview/pic/input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/interview/pic/input.png
--------------------------------------------------------------------------------
/jvm-art/images/art/class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/jvm-art/images/art/class.png
--------------------------------------------------------------------------------
/jvm-art/images/art/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/jvm-art/images/art/summary.png
--------------------------------------------------------------------------------
/jvm-art/images/reflection/getmethod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/jvm-art/images/reflection/getmethod.png
--------------------------------------------------------------------------------
/jvm-art/images/reflection/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/jvm-art/images/reflection/summary.png
--------------------------------------------------------------------------------
/jvm-art/images/reflection/summary1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5A59/android-training/ec2ea66743f2859bd786bf934f62acb1b5c8be37/jvm-art/images/reflection/summary1.png
--------------------------------------------------------------------------------
/mock-in/2021帮助100位安卓开发者入职大厂.md:
--------------------------------------------------------------------------------
1 | ## 2021 帮助 100 位安卓开发者入职大厂
2 | 自从在网上更新一些安卓知识文章以后,收到了很多读者朋友们不错的反馈,我也很高兴能给大家带来帮助和启发,至少说明这些文章还是有一些价值的
3 |
4 | 在新的一年里,我想给大家提供一些更实质的帮助,希望能 2021 年能 **【帮助 100 位安卓开发者入职大厂】**
5 |
6 | 我觉得这件事,在一定程度上是有意义的
7 |
8 | 可能对于一些大佬来说,在大厂之间游走是很随意的事情,但是还有更多的是希望能进入大厂的开发者,他们可能缺少一些机会,可能缺少一些方法,可能缺少一些指导,而且进入大厂这件事可能会给后面的人生带来不一样的可能性
9 |
10 | 而且这件事其实是互利互惠的,对开发者来说,获得进入大厂的机会,对公司来说,也有更多的选择范围,对我来说当然是有发文的话题了,另外也是一个提升的机会,对其他读者来说,从面试题目中应该也能得到一些启发
11 |
12 | 所以我想来尝试做这件事
13 |
14 | **具体怎么做呢?**
15 |
16 | 1. 尽可能提供大厂内推的机会(当然目前内推可能比较少,不过我相信后面会多起来的)
17 | 2. 提供简历修改建议
18 | 3. 提供模拟面试以及面试建议
19 | 4. 大厂面试过程中遇到的问题讨论
20 |
21 | 后面应该还会有更多的想法
22 |
23 | **为什么是 100 位呢?**
24 | 先定一个小目标吧
25 |
26 | **怎么参与?**
27 | 公众号 ZYLAB 后台回复 2021 即可
28 |
29 |
--------------------------------------------------------------------------------