├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ └── dimens.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── assets │ │ │ └── plugins │ │ │ │ ├── plugin-release-unsigned.apk │ │ │ │ └── pluginlib-release-unsigned.apk │ │ ├── java │ │ │ └── com │ │ │ │ └── lrhehe │ │ │ │ └── hostplugin │ │ │ │ ├── MyApplication.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── HostPlugin.java │ │ │ │ ├── PluginLoader.java │ │ │ │ └── ReflectAccelerator.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── lrhehe │ │ │ └── hostplugin │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── lrhehe │ │ └── hostplugin │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── plugin ├── .gitignore ├── plibs │ └── classes.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── strings.xml │ │ │ │ └── dimens.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── lrhehe │ │ │ └── hostplugin │ │ │ └── plugin │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── lrhehe │ │ │ └── hostplugin │ │ │ └── plugin │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── lrhehe │ │ └── hostplugin │ │ └── plugin │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── pluginlib ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── layout │ │ │ │ └── activity_pluginlib.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── lrhehe │ │ │ │ └── hostplugin │ │ │ │ └── pluginlib │ │ │ │ ├── PluginLibUtils.java │ │ │ │ └── PluginLibActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── lrhehe │ │ │ └── hostplugin │ │ │ └── pluginlib │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── lrhehe │ │ └── hostplugin │ │ └── pluginlib │ │ └── ApplicationTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── hostplugin.jks ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── README.md ├── gradlew.bat ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /pluginlib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':pluginlib' 2 | include ':plugin' -------------------------------------------------------------------------------- /hostplugin.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/hostplugin.jks -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /plugin/plibs/classes.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/plibs/classes.jar -------------------------------------------------------------------------------- /plugin/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | HostPlugin 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugin/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugin/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugin/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugin/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /plugin/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/plugin/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/assets/plugins/plugin-release-unsigned.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/assets/plugins/plugin-release-unsigned.apk -------------------------------------------------------------------------------- /app/src/main/assets/plugins/pluginlib-release-unsigned.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lrhehe/AndroidHostPlugin/HEAD/app/src/main/assets/plugins/pluginlib-release-unsigned.apk -------------------------------------------------------------------------------- /pluginlib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PluginLib 3 | greet form PluginLib 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /plugin/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /pluginlib/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 23 21:05:54 CST 2016 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-2.9-all.zip 7 | -------------------------------------------------------------------------------- /plugin/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Plugin 3 | Settings 4 | goto PluginLibActivity 5 | greet from plugin 6 | 7 | -------------------------------------------------------------------------------- /plugin/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /plugin/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/com/lrhehe/hostplugin/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /plugin/src/test/java/com/lrhehe/hostplugin/plugin/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin.plugin; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /pluginlib/src/main/java/com/lrhehe/hostplugin/pluginlib/PluginLibUtils.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin.pluginlib; 2 | 3 | import android.content.Context; 4 | import android.widget.Toast; 5 | 6 | /** 7 | * @Author ray 8 | * @Date 3/31/16. 9 | */ 10 | public class PluginLibUtils { 11 | 12 | public static void toast(Context context, String tip) { 13 | Toast.makeText(context, tip, Toast.LENGTH_LONG).show(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /pluginlib/src/test/java/com/lrhehe/hostplugin/pluginlib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin.pluginlib; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/lrhehe/hostplugin/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /plugin/src/androidTest/java/com/lrhehe/hostplugin/plugin/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin.plugin; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /pluginlib/src/androidTest/java/com/lrhehe/hostplugin/pluginlib/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin.pluginlib; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /pluginlib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrhehe/hostplugin/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.lrhehe.hostplugin; 2 | 3 | import android.app.Application; 4 | 5 | /** 6 | * @Author ray 7 | * @Date 3/26/16. 8 | */ 9 | public class MyApplication extends Application { 10 | private static MyApplication mInstance; 11 | 12 | public static MyApplication getInstance() { 13 | return mInstance; 14 | } 15 | 16 | @Override 17 | public void onCreate() { 18 | super.onCreate(); 19 | HostPlugin.init(this); 20 | mInstance = this; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /pluginlib/src/main/res/layout/activity_pluginlib.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 |