├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── README_CN.md ├── README_ORIGINAL.md ├── build.gradle ├── deploy.sh ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── proguard-rules-android.pro ├── replugin-host-gradle ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── groovy │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── gradle │ │ ├── compat │ │ ├── GradleCompat.groovy │ │ ├── ScopeCompat.groovy │ │ └── VariantCompat.groovy │ │ └── host │ │ ├── AppConstant.groovy │ │ ├── RePlugin.groovy │ │ ├── creator │ │ ├── FileCreators.groovy │ │ ├── IFileCreator.groovy │ │ └── impl │ │ │ ├── java │ │ │ └── RePluginHostConfigCreator.groovy │ │ │ └── json │ │ │ ├── PluginBuiltinJsonCreator.groovy │ │ │ ├── PluginInfo.groovy │ │ │ └── PluginInfoParser.groovy │ │ └── handlemanifest │ │ └── ComponentsGenerator.groovy │ └── resources │ └── META-INF │ └── gradle-plugins │ └── replugin-host-gradle.properties ├── replugin-host-library ├── bintray.gradle ├── build.gradle ├── replugin-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ └── com │ │ └── qihoo360 │ │ ├── loader2 │ │ ├── IPlugin.aidl │ │ ├── IPluginClient.aidl │ │ ├── IPluginHost.aidl │ │ ├── PluginBinderInfo.aidl │ │ ├── mgr │ │ │ └── IServiceConnection.aidl │ │ └── sp │ │ │ └── IPref.aidl │ │ ├── mobilesafe │ │ └── svcmanager │ │ │ └── IServiceChannel.aidl │ │ └── replugin │ │ ├── IBinderGetter.aidl │ │ ├── component │ │ └── service │ │ │ └── server │ │ │ └── IPluginServiceServer.aidl │ │ ├── model │ │ └── PluginInfo.aidl │ │ └── packages │ │ ├── IPluginManagerServer.aidl │ │ └── PluginRunningList.aidl │ └── java │ └── com │ └── qihoo360 │ ├── i │ ├── Factory.java │ ├── Factory2.java │ ├── IModule.java │ ├── IPlugin.java │ └── IPluginManager.java │ ├── loader │ ├── utils │ │ ├── PackageUtils.java │ │ ├── PatchClassLoaderUtils.java │ │ ├── ProcessLocker.java │ │ ├── StringUtils.java │ │ └── SysUtils.java │ └── utils2 │ │ └── FilePermissionUtils.java │ ├── loader2 │ ├── BinderCursor.java │ ├── BuildCompat.java │ ├── Builder.java │ ├── CertUtils.java │ ├── Constant.java │ ├── DumpUtils.java │ ├── Finder.java │ ├── FinderBuiltin.java │ ├── LaunchModeStates.java │ ├── Loader.java │ ├── MP.java │ ├── PMF.java │ ├── Plugin.java │ ├── PluginBinderInfo.java │ ├── PluginCommImpl.java │ ├── PluginContainers.java │ ├── PluginContext.java │ ├── PluginDesc.java │ ├── PluginIntent.java │ ├── PluginLibraryInternalProxy.java │ ├── PluginManager.java │ ├── PluginNativeLibsHelper.java │ ├── PluginProcessMain.java │ ├── PluginProcessPer.java │ ├── PluginProviderStub.java │ ├── PluginStatusController.java │ ├── PluginTable.java │ ├── PmBase.java │ ├── PmHostSvc.java │ ├── ProcessStates.java │ ├── StubProcessManager.java │ ├── TaskAffinityStates.java │ ├── V5FileInfo.java │ ├── V5Finder.java │ ├── VMRuntimeCompat.java │ ├── alc │ │ ├── ActivityController.java │ │ └── IActivityWatcher.java │ ├── mgr │ │ ├── PluginProviderClient.java │ │ └── PluginServiceClient.java │ └── sp │ │ └── PrefImpl.java │ ├── mobilesafe │ ├── api │ │ ├── AppVar.java │ │ ├── IPC.java │ │ ├── Intents.java │ │ ├── Pref.java │ │ └── Tasks.java │ ├── loader │ │ ├── a │ │ │ └── DummyActivity.java │ │ ├── p │ │ │ └── DummyProvider.java │ │ └── s │ │ │ └── DummyService.java │ ├── parser │ │ └── manifest │ │ │ ├── ManifestParser.java │ │ │ ├── XmlHandler.java │ │ │ └── bean │ │ │ ├── ComponentBean.java │ │ │ └── DataBean.java │ └── svcmanager │ │ ├── ParcelBinder.java │ │ ├── PluginServiceManager.java │ │ ├── PluginServiceRecord.java │ │ ├── PluginServiceReferenceManager.java │ │ ├── QihooServiceManager.java │ │ ├── ServiceChannelCursor.java │ │ ├── ServiceChannelImpl.java │ │ ├── ServiceProvider.java │ │ └── ServiceWrapper.java │ └── replugin │ ├── ContextInjector.java │ ├── DefaultRePluginCallbacks.java │ ├── DefaultRePluginEventCallbacks.java │ ├── IHostBinderFetcher.java │ ├── PluginDexClassLoader.java │ ├── PluginDexClassLoaderPatch.java │ ├── RePlugin.java │ ├── RePluginApplication.java │ ├── RePluginCallbacks.java │ ├── RePluginClassLoader.java │ ├── RePluginConfig.java │ ├── RePluginConstants.java │ ├── RePluginEventCallbacks.java │ ├── RePluginInternal.java │ ├── base │ ├── AMSUtils.java │ ├── IPC.java │ ├── LocalBroadcastHelper.java │ └── ThreadUtils.java │ ├── compat │ ├── CompatConfig.java │ ├── LocalBroadcastManager.java │ ├── LocalBroadcastManagerAndroidX.java │ └── LocalBroadcastManagerSupport.java │ ├── component │ ├── ComponentList.java │ ├── activity │ │ ├── ActivityInjector.java │ │ └── DynamicClassProxyActivity.java │ ├── app │ │ └── PluginApplicationClient.java │ ├── dummy │ │ ├── DummyActivity.java │ │ ├── DummyProvider.java │ │ ├── DummyReceiver.java │ │ ├── DummyService.java │ │ └── ForwardActivity.java │ ├── process │ │ ├── PluginProcessHost.java │ │ ├── ProcessPitProviderBase.java │ │ ├── ProcessPitProviderLoader0.java │ │ ├── ProcessPitProviderLoader1.java │ │ ├── ProcessPitProviderP0.java │ │ ├── ProcessPitProviderP1.java │ │ ├── ProcessPitProviderP2.java │ │ ├── ProcessPitProviderPersist.java │ │ └── ProcessPitProviderUI.java │ ├── provider │ │ ├── PluginPitProviderBase.java │ │ ├── PluginPitProviderP0.java │ │ ├── PluginPitProviderP1.java │ │ ├── PluginPitProviderP2.java │ │ ├── PluginPitProviderPersist.java │ │ ├── PluginPitProviderUI.java │ │ ├── PluginProviderClient.java │ │ ├── PluginProviderClient2.java │ │ └── PluginProviderHelper.java │ ├── receiver │ │ ├── PluginReceiverHelper.java │ │ └── PluginReceiverProxy.java │ ├── service │ │ ├── PluginServiceClient.java │ │ ├── PluginServiceDispatcherManager.java │ │ ├── PluginServiceServerFetcher.java │ │ ├── ServiceDispatcher.java │ │ └── server │ │ │ ├── ConnectionBindRecord.java │ │ │ ├── IntentBindRecord.java │ │ │ ├── PluginPitService.java │ │ │ ├── PluginServiceServer.java │ │ │ ├── ProcessBindRecord.java │ │ │ ├── ProcessRecord.java │ │ │ └── ServiceRecord.java │ └── utils │ │ ├── ApkCommentReader.java │ │ ├── IntentMatcherHelper.java │ │ └── PluginClientHelper.java │ ├── debugger │ └── DebuggerReceivers.java │ ├── ext │ └── parser │ │ ├── AbstractApkParser.java │ │ ├── ApkParser.java │ │ ├── exception │ │ └── ParserException.java │ │ ├── parser │ │ ├── BinaryXmlParser.java │ │ ├── StringPoolEntry.java │ │ ├── XmlNamespaces.java │ │ ├── XmlStreamer.java │ │ └── XmlTranslator.java │ │ ├── struct │ │ ├── ChunkHeader.java │ │ ├── ChunkType.java │ │ ├── ResourceValue.java │ │ ├── StringPool.java │ │ ├── StringPoolHeader.java │ │ └── xml │ │ │ ├── Attribute.java │ │ │ ├── Attributes.java │ │ │ ├── NullHeader.java │ │ │ ├── XmlHeader.java │ │ │ ├── XmlNamespaceEndTag.java │ │ │ ├── XmlNamespaceStartTag.java │ │ │ ├── XmlNodeEndTag.java │ │ │ ├── XmlNodeHeader.java │ │ │ ├── XmlNodeStartTag.java │ │ │ └── XmlResourceMapHeader.java │ │ └── utils │ │ ├── Buffers.java │ │ ├── ParseUtils.java │ │ └── xml │ │ ├── AggregateTranslator.java │ │ ├── CharSequenceTranslator.java │ │ ├── CodePointTranslator.java │ │ ├── EntityArrays.java │ │ ├── LookupTranslator.java │ │ ├── NumericEntityEscaper.java │ │ ├── UnicodeUnpairedSurrogateRemover.java │ │ └── XmlEscaper.java │ ├── helper │ ├── HostConfigHelper.java │ ├── JSONHelper.java │ ├── LogDebug.java │ └── LogRelease.java │ ├── model │ ├── PluginInfo.java │ └── PluginInfoList.java │ ├── packages │ ├── PluginFastInstallProvider.java │ ├── PluginFastInstallProviderProxy.java │ ├── PluginInfoUpdater.java │ ├── PluginManagerProxy.java │ ├── PluginManagerServer.java │ ├── PluginPublishFileGenerator.java │ ├── PluginRunningList.java │ └── RePluginInstaller.java │ └── utils │ ├── AssetsUtils.java │ ├── Charsets.java │ ├── CloseableUtils.java │ ├── Dex2OatUtils.java │ ├── FileUtils.java │ ├── IOUtils.java │ ├── InterpretDex2OatHelper.java │ ├── ReflectUtils.java │ ├── StringBuilderWriter.java │ ├── Validate.java │ ├── basic │ ├── ArrayMap.java │ ├── ArraySet.java │ ├── ByteConvertor.java │ ├── ContainerHelpers.java │ ├── MapCollections.java │ ├── SecurityUtil.java │ └── SimpleArrayMap.java │ └── pkg │ └── PackageFilesUtil.java ├── replugin-plugin-gradle ├── README.md ├── bintray.gradle ├── build.gradle ├── config.gradle ├── config.properties ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── groovy │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── gradle │ │ └── plugin │ │ ├── AppConstant.groovy │ │ ├── ReClassPlugin.groovy │ │ ├── debugger │ │ └── PluginDebugger.groovy │ │ ├── injector │ │ ├── BaseInjector.groovy │ │ ├── IClassInjector.groovy │ │ ├── Injectors.groovy │ │ ├── identifier │ │ │ ├── GetIdentifierExprEditor.groovy │ │ │ └── GetIdentifierInjector.groovy │ │ ├── loaderactivity │ │ │ └── LoaderActivityInjector.groovy │ │ ├── localbroadcast │ │ │ ├── LocalBroadcastExprEditor.groovy │ │ │ └── LocalBroadcastInjector.groovy │ │ └── provider │ │ │ ├── ProviderExprEditor.groovy │ │ │ ├── ProviderExprEditor2.groovy │ │ │ ├── ProviderInjector.groovy │ │ │ └── ProviderInjector2.groovy │ │ ├── inner │ │ ├── ClassFileVisitor.groovy │ │ ├── CommonData.groovy │ │ ├── ReClassTransform.groovy │ │ └── Util.groovy │ │ ├── manifest │ │ ├── IManifest.groovy │ │ ├── ManifestAPI.groovy │ │ └── ManifestReader.groovy │ │ └── util │ │ ├── CmdUtil.groovy │ │ └── FileUtil.groovy │ └── resources │ └── META-INF │ └── gradle-plugins │ └── replugin-plugin-gradle.properties ├── replugin-plugin-library ├── bintray.gradle ├── build.gradle ├── proguard-rules.pro ├── replugin-library-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ └── com │ │ └── qihoo360 │ │ ├── loader2 │ │ └── IPlugin.aidl │ │ └── replugin │ │ └── IBinderGetter.aidl │ └── java │ └── com │ └── qihoo360 │ └── replugin │ ├── Entry.java │ ├── MethodInvoker.java │ ├── RePlugin.java │ ├── RePluginCompat.java │ ├── RePluginEnv.java │ ├── RePluginFramework.java │ ├── RePluginInternal.java │ ├── RePluginServiceManager.java │ ├── base │ └── IPC.java │ ├── compat │ └── CompatConfig.java │ ├── helper │ ├── JSONHelper.java │ ├── LogDebug.java │ └── LogRelease.java │ ├── i │ └── IPluginManager.java │ ├── loader │ ├── PluginResource.java │ ├── a │ │ ├── PluginActivity.java │ │ ├── PluginActivityGroup.java │ │ ├── PluginAppCompatActivity.java │ │ ├── PluginAppCompatActivityAndroidX.java │ │ ├── PluginExpandableListActivity.java │ │ ├── PluginFragmentActivity.java │ │ ├── PluginFragmentActivityAndroidX.java │ │ ├── PluginListActivity.java │ │ ├── PluginPreferenceActivity.java │ │ └── PluginTabActivity.java │ ├── b │ │ └── PluginLocalBroadcastManager.java │ ├── p │ │ └── PluginProviderClient.java │ └── s │ │ └── PluginServiceClient.java │ ├── model │ └── PluginInfo.java │ ├── packages │ └── PluginRunningList.java │ └── utils │ ├── ParcelUtils.java │ └── ReflectUtils.java ├── replugin-sample-extra ├── README.md └── fresco │ ├── FrescoHost │ ├── .gitignore │ ├── app │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── libs │ │ │ ├── armeabi │ │ │ │ └── libimagepipeline.so │ │ │ ├── drawee-modified-1.7.1.jar │ │ │ ├── fbcore-1.7.1.jar │ │ │ ├── fresco-1.7.1.jar │ │ │ ├── imagepipeline-1.7.1.jar │ │ │ └── imagepipeline-base-1.7.1.jar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── plugins │ │ │ │ └── plugin1.jar │ │ │ ├── java │ │ │ └── com │ │ │ │ ├── facebook │ │ │ │ └── fresco │ │ │ │ │ └── patch │ │ │ │ │ ├── DraweeStyleableCallbackImpl.java │ │ │ │ │ └── FrescoPatch.java │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── fresco │ │ │ │ └── host │ │ │ │ ├── HostApp.java │ │ │ │ ├── HostFrescoActivity.java │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_host_fresco.xml │ │ │ └── activity_main.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 │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ └── FrescoPlugin │ ├── .gitignore │ ├── app │ ├── .gitignore │ ├── build.gradle │ ├── libs │ │ ├── armeabi │ │ │ └── libimagepipeline.so │ │ ├── drawee-modified-1.7.1.jar │ │ ├── fbcore-1.7.1.jar │ │ ├── fresco-1.7.1.jar │ │ ├── imagepipeline-1.7.1.jar │ │ └── imagepipeline-base-1.7.1.jar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ ├── facebook │ │ │ └── fresco │ │ │ │ └── patch │ │ │ │ ├── DraweeStyleableCallbackImpl.java │ │ │ │ └── FrescoPatch.java │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── fresco │ │ │ └── plugin │ │ │ ├── MainActivity.java │ │ │ └── PluginApp.java │ │ └── res │ │ ├── layout │ │ └── activity_main.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 │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── replugin-sample ├── README.md ├── host │ ├── app │ │ ├── build.gradle │ │ ├── libs │ │ │ └── common-utils-lib-1.0.0.jar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ ├── external │ │ │ │ └── README │ │ │ └── plugins │ │ │ │ ├── demo1.jar │ │ │ │ ├── demo2.jar │ │ │ │ └── webview.jar │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── host │ │ │ │ ├── FileProvider.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── PluginFragmentActivity.java │ │ │ │ └── SampleApplication.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ └── activity_plugin_fragment.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── notification_out.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 │ │ │ ├── public.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ │ └── xml │ │ │ └── fileprovider_path.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── utils │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── common │ │ └── utils │ │ └── TimeUtils.java └── plugin │ ├── plugin-demo1 │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ ├── case.gradle │ │ ├── libs │ │ │ ├── common-utils-lib-1.0.0.jar │ │ │ ├── fragment.jar │ │ │ └── plugin-library.aar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ └── IDemo2.aidl │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo1 │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MainApp.java │ │ │ │ ├── TestItem.java │ │ │ │ ├── activity │ │ │ │ ├── file_provider │ │ │ │ │ ├── BitmapUtils.java │ │ │ │ │ └── FileProviderActivity.java │ │ │ │ ├── for_result │ │ │ │ │ └── ForResultActivity.java │ │ │ │ ├── intent_filter │ │ │ │ │ └── IntentFilterDemoActivity1.java │ │ │ │ ├── notify_test │ │ │ │ │ └── NotifyActivity.java │ │ │ │ ├── preference │ │ │ │ │ ├── PrefActivity1.java │ │ │ │ │ └── PrefActivity2.java │ │ │ │ ├── single_instance │ │ │ │ │ └── TIActivity1.java │ │ │ │ ├── single_top │ │ │ │ │ └── SingleTopActivity1.java │ │ │ │ ├── standard │ │ │ │ │ └── StandardActivity.java │ │ │ │ ├── task_affinity │ │ │ │ │ ├── TAActivity1.java │ │ │ │ │ ├── TAActivity2.java │ │ │ │ │ ├── TAActivity3.java │ │ │ │ │ ├── TAActivity4.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── task_affinity_2 │ │ │ │ │ ├── TA2Activity1.java │ │ │ │ │ ├── TA2Activity2.java │ │ │ │ │ ├── TA2Activity3.java │ │ │ │ │ ├── TA2Activity4.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── theme │ │ │ │ │ ├── ThemeBlackNoTitleBarActivity.java │ │ │ │ │ ├── ThemeBlackNoTitleBarFullscreenActivity.java │ │ │ │ │ └── ThemeDialogActivity.java │ │ │ │ └── webview │ │ │ │ │ └── WebViewActivity.java │ │ │ │ ├── fragment │ │ │ │ ├── DemoCodeFragment.java │ │ │ │ └── DemoFragment.java │ │ │ │ ├── provider │ │ │ │ ├── FileProvider.java │ │ │ │ └── Provider2.java │ │ │ │ ├── receivers │ │ │ │ └── PluginDemo1Receiver.java │ │ │ │ ├── service │ │ │ │ ├── PluginDemoAppService.java │ │ │ │ ├── PluginDemoService1.java │ │ │ │ └── PluginDemoService2.java │ │ │ │ ├── support │ │ │ │ ├── LogX.java │ │ │ │ └── NotifyUtils.java │ │ │ │ └── webview │ │ │ │ ├── IWebPage.java │ │ │ │ ├── ViewProxy.java │ │ │ │ └── WebPageProxy.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── layout_notify.xml │ │ │ ├── main.xml │ │ │ ├── main_fragment.xml │ │ │ ├── simple.xml │ │ │ ├── simple_2.xml │ │ │ └── simple_4.xml │ │ │ ├── mipmap-xhdpi │ │ │ └── app_icon.png │ │ │ ├── values │ │ │ └── strings.xml │ │ │ └── xml │ │ │ ├── fileprovider_path.xml │ │ │ └── pref_headers.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── library │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── library │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── qihoo360 │ │ │ │ │ └── replugin │ │ │ │ │ └── sample │ │ │ │ │ └── library │ │ │ │ │ └── LibMainActivity.java │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ ├── content_lib_main.xml │ │ │ │ └── lib_activity_main.xml │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── library │ │ │ └── ExampleUnitTest.java │ └── settings.gradle │ ├── plugin-demo2 │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ ├── case.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ └── IDemo2.aidl │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ ├── Demo2Impl.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MainApp.java │ │ │ │ ├── activity │ │ │ │ ├── appcompat │ │ │ │ │ └── AppCompatActivityDemo.java │ │ │ │ └── for_result │ │ │ │ │ └── ForResultActivity.java │ │ │ │ ├── databinding │ │ │ │ ├── DataBindingActivity.java │ │ │ │ └── Entry.java │ │ │ │ ├── receivers │ │ │ │ └── PluginDemo2Receiver.java │ │ │ │ ├── service │ │ │ │ └── PluginDemo2Service.java │ │ │ │ ├── support │ │ │ │ └── LogX.java │ │ │ │ └── testcase │ │ │ │ └── TestMultiDex.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── databinding_test.xml │ │ │ └── from_demo1.xml │ │ │ ├── mipmap-xhdpi │ │ │ └── app_icon.png │ │ │ └── values │ │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── plugin-demo3-kotlin │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ ├── libs │ │ │ └── fragment.jar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ └── IDemo2.aidl │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo3 │ │ │ │ ├── BaseActivity.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MainApp.kt │ │ │ │ ├── TestItem.kt │ │ │ │ ├── activity │ │ │ │ └── theme │ │ │ │ │ └── ThemeBlackNoTitleBarActivity.kt │ │ │ │ ├── receivers │ │ │ │ └── PluginDemo3Receiver.kt │ │ │ │ ├── service │ │ │ │ └── PluginDemoService1.kt │ │ │ │ └── support │ │ │ │ └── LogX.kt │ │ │ └── res │ │ │ ├── layout │ │ │ ├── main.xml │ │ │ ├── main_fragment.xml │ │ │ └── simple.xml │ │ │ ├── mipmap-xhdpi │ │ │ └── app_icon.png │ │ │ └── values │ │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ └── plugin-webview │ ├── README.md │ ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── webview │ │ │ ├── MainActivity.java │ │ │ ├── MainApp.java │ │ │ ├── common │ │ │ ├── CommonWebChromeClient.java │ │ │ ├── CommonWebView.java │ │ │ └── CommonWebViewClient.java │ │ │ ├── env │ │ │ └── Env.java │ │ │ ├── utils │ │ │ ├── ReflectUtil.java │ │ │ └── WebViewResourceHelper.java │ │ │ └── views │ │ │ ├── SimpleWebPage.java │ │ │ └── SimpleWebView.java │ │ └── res │ │ ├── drawable │ │ └── ic_launcher.png │ │ ├── layout │ │ ├── web_page.xml │ │ └── webview.xml │ │ └── values │ │ ├── colors.xml │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── repluginx-sample ├── host │ ├── app │ │ ├── build.gradle │ │ ├── libs │ │ │ └── common-utils-lib-1.0.0.jar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ ├── external │ │ │ │ └── README │ │ │ └── plugins │ │ │ │ ├── demo1.jar │ │ │ │ ├── demo2.jar │ │ │ │ └── webview.jar │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── host │ │ │ │ ├── FileProvider.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── PluginFragmentActivity.java │ │ │ │ └── SampleApplication.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ └── activity_plugin_fragment.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── notification_out.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 │ │ │ ├── public.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ │ └── xml │ │ │ └── fileprovider_path.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── utils │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── common │ │ └── utils │ │ └── TimeUtils.java └── plugin │ └── plugin-demo1 │ ├── README.md │ ├── app │ ├── build.gradle │ ├── case.gradle │ ├── libs │ │ ├── androidx-activity.jar │ │ ├── androidx-fragment.jar │ │ ├── androidx-lifecycle-common-2.4.0.jar │ │ ├── androidx-lifecycle-viewmodel.jar │ │ ├── androidx-savedstate.jar │ │ ├── common-utils-lib-1.0.0.jar │ │ └── plugin-library.aar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── demo2 │ │ │ └── IDemo2.aidl │ │ ├── java │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── demo1 │ │ │ ├── BaseActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MainApp.java │ │ │ ├── TestItem.java │ │ │ ├── activity │ │ │ ├── file_provider │ │ │ │ ├── BitmapUtils.java │ │ │ │ └── FileProviderActivity.java │ │ │ ├── for_result │ │ │ │ └── ForResultActivity.java │ │ │ ├── intent_filter │ │ │ │ └── IntentFilterDemoActivity1.java │ │ │ ├── notify_test │ │ │ │ └── NotifyActivity.java │ │ │ ├── preference │ │ │ │ ├── PrefActivity1.java │ │ │ │ └── PrefActivity2.java │ │ │ ├── single_instance │ │ │ │ └── TIActivity1.java │ │ │ ├── single_top │ │ │ │ └── SingleTopActivity1.java │ │ │ ├── standard │ │ │ │ └── StandardActivity.java │ │ │ ├── task_affinity │ │ │ │ ├── TAActivity1.java │ │ │ │ ├── TAActivity2.java │ │ │ │ ├── TAActivity3.java │ │ │ │ ├── TAActivity4.java │ │ │ │ └── package-info.java │ │ │ ├── task_affinity_2 │ │ │ │ ├── TA2Activity1.java │ │ │ │ ├── TA2Activity2.java │ │ │ │ ├── TA2Activity3.java │ │ │ │ ├── TA2Activity4.java │ │ │ │ └── package-info.java │ │ │ ├── theme │ │ │ │ ├── ThemeBlackNoTitleBarActivity.java │ │ │ │ ├── ThemeBlackNoTitleBarFullscreenActivity.java │ │ │ │ └── ThemeDialogActivity.java │ │ │ └── webview │ │ │ │ └── WebViewActivity.java │ │ │ ├── fragment │ │ │ ├── DemoCodeFragment.java │ │ │ └── DemoFragment.java │ │ │ ├── provider │ │ │ ├── FileProvider.java │ │ │ └── Provider2.java │ │ │ ├── receivers │ │ │ └── PluginDemo1Receiver.java │ │ │ ├── service │ │ │ ├── PluginDemoAppService.java │ │ │ ├── PluginDemoService1.java │ │ │ └── PluginDemoService2.java │ │ │ ├── support │ │ │ ├── LogX.java │ │ │ └── NotifyUtils.java │ │ │ └── webview │ │ │ ├── IWebPage.java │ │ │ ├── ViewProxy.java │ │ │ └── WebPageProxy.java │ │ └── res │ │ ├── layout │ │ ├── layout_notify.xml │ │ ├── main.xml │ │ ├── main_fragment.xml │ │ ├── simple.xml │ │ ├── simple_2.xml │ │ └── simple_4.xml │ │ ├── mipmap-xhdpi │ │ └── app_icon.png │ │ ├── values │ │ └── strings.xml │ │ └── xml │ │ ├── fileprovider_path.xml │ │ └── pref_headers.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── library │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── library │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── library │ │ │ │ └── LibMainActivity.java │ │ └── res │ │ │ ├── layout │ │ │ ├── content_lib_main.xml │ │ │ └── lib_activity_main.xml │ │ │ └── values │ │ │ └── strings.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── sample │ │ └── library │ │ └── ExampleUnitTest.java │ └── settings.gradle ├── rp-config.gradle ├── rp-publish.gradle ├── rpx-config.gradle ├── rpx-maven-repository.gradle └── settings.gradle /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### 问题详细描述 Detailed description of the problem 2 | 3 | 4 | #### 复现问题步骤 Steps to reproduce the problem 5 | 1. 6 | 2. 7 | 8 | #### 其它重要信息 Other important information 9 | 10 | replugin-host-lib/gradle Version: 11 | rePlugin-plugin-lib/gradle Version: 12 | 13 | Android API Version: 14 | Android 手机型号&ROM(Phone model & ROM): 15 | 16 | #### Logcat上下文 Logcat context 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### 要解决的问题 Describe the problem to be solved 2 | 1. 3 | 2. 4 | 5 | #### 要解决的Issue编号(可多个) Associated issue number (multiple) 6 | # -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | { p, cfg = "rpx-config.gradle" -> if (new File(p, cfg).exists()) apply from: "${p}/${cfg}" else if (p.exists()) call(p.parentFile) }(buildscript.sourceFile.parentFile) 5 | repositories repositoriesExt 6 | dependencies { 7 | classpath classpathExt['android-build-tools'] 8 | classpath classpathExt['android-maven-gradle-plugin'] 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories repositoriesExt 14 | } 15 | 16 | task clean(type: Delete) { 17 | delete rootProject.buildDir 18 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Dec 07 14:01:46 CST 2021 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-3.3-all.zip 7 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 8 | #distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 9 | #distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 10 | #distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 11 | -------------------------------------------------------------------------------- /replugin-host-gradle/README.md: -------------------------------------------------------------------------------- 1 | # RePlugin Host Gradle 2 | 3 | RePlugin Host Gradle是一个Gradle插件,由 **主程序** 负责引入。 4 | 5 | 该Gradle插件主要负责在主程序的编译期中做一些事情,此外,开发者可通过修改其属性而做一些自定义的操作。 6 | 7 | 大致包括: 8 | 9 | * 生成带 RePlugin 插件坑位的 AndroidManifest.xml(允许自定义数量) 10 | * 生成HostBuildConfig类,方便插件框架读取并自定义其属性 11 | 12 | 开发者需要依赖此Gradle插件,以实现对RePlugin的接入。请参见WiKi以了解接入方法。 13 | 14 | 有关RePlugin Host Gradle的详细描述,请访问我们的WiKi,以了解更多的内容。 15 | (文档正在完善,请耐心等待) -------------------------------------------------------------------------------- /replugin-host-gradle/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-host-gradle/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /replugin-host-gradle/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | 17 | #Mon Dec 28 10:00:20 PST 2015 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | zipStoreBase=GRADLE_USER_HOME 21 | zipStorePath=wrapper/dists 22 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 23 | -------------------------------------------------------------------------------- /replugin-host-gradle/src/main/groovy/com/qihoo360/replugin/gradle/compat/VariantCompat.groovy: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.gradle.compat 2 | 3 | import org.gradle.api.Task 4 | 5 | /** 6 | * @author hyongbai 7 | */ 8 | class VariantCompat { 9 | static def getAssembleTask(def variant) { 10 | return compatGetTask(variant, "getAssembleProvider", "getAssemble") 11 | } 12 | 13 | static def getMergeAssetsTask(def variant) { 14 | return compatGetTask(variant, "getMergeAssetsProvider", "getMergeAssets") 15 | } 16 | 17 | static def getGenerateBuildConfigTask(def variant) { 18 | return compatGetTask(variant, "getGenerateBuildConfigProvider", "getGenerateBuildConfig") 19 | } 20 | 21 | static def getProcessManifestTask(def variant) { 22 | return compatGetTask(variant, "getProcessManifestProvider", "getProcessManifest") 23 | } 24 | 25 | static def compatGetTask(def variant, String... candidates) { 26 | candidates?.findResult { 27 | variant.metaClass.respondsTo(variant, it).with { 28 | if (!it.isEmpty()) return it 29 | } 30 | }?.find { 31 | it.getParameterTypes().length == 0 32 | }?.invoke(variant)?.with { 33 | //TODO: check if is provider!!! 34 | Task.class.isInstance(it) ? it : it?.get() 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /replugin-host-gradle/src/main/groovy/com/qihoo360/replugin/gradle/host/creator/IFileCreator.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.gradle.host.creator; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public interface IFileCreator { 23 | 24 | /** 25 | * 要生成的文件所在目录 26 | */ 27 | File getFileDir() 28 | 29 | /** 30 | * 要生成的文件的名称 31 | */ 32 | String getFileName() 33 | 34 | /** 35 | * 要生成的文件内容 36 | */ 37 | String getFileContent() 38 | } 39 | -------------------------------------------------------------------------------- /replugin-host-gradle/src/main/groovy/com/qihoo360/replugin/gradle/host/creator/impl/json/PluginInfo.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.gradle.host.creator.impl.json 18 | 19 | /** 20 | * 插件信息模型 21 | * @author RePlugin Team 22 | */ 23 | class PluginInfo { 24 | 25 | /** 插件文件路径 */ 26 | def path 27 | /** 插件包名 */ 28 | def pkg 29 | /** 插件名 */ 30 | def name 31 | /** 插件最低兼容版本 */ 32 | Long low 33 | /** 插件最高兼容版本 */ 34 | Long high 35 | /** 插件版本号 */ 36 | Long ver 37 | /** 框架版本号 */ 38 | Long frm 39 | 40 | } 41 | -------------------------------------------------------------------------------- /replugin-host-gradle/src/main/resources/META-INF/gradle-plugins/replugin-host-gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | implementation-class=com.qihoo360.replugin.gradle.host.Replugin 17 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/loader2/IPlugin.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.loader2; 2 | 3 | /** 4 | * @author RePlugin Team 5 | */ 6 | interface IPlugin { 7 | 8 | IBinder query(String name); 9 | } 10 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/loader2/IPluginClient.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.loader2; 2 | 3 | import com.qihoo360.replugin.component.service.server.IPluginServiceServer; 4 | 5 | /** 6 | * @author RePlugin Team 7 | */ 8 | interface IPluginClient { 9 | 10 | // 参数 plugin, process 可能有冗余,目前临时使用,后续可能优化 11 | String allocActivityContainer(String plugin, int process, String target, in Intent intent); 12 | 13 | // 参数 plugin 用来处理多插件单进程情况 14 | IBinder queryBinder(String plugin, String binder); 15 | 16 | void releaseBinder(); 17 | 18 | oneway void sendIntent(in Intent intent); 19 | 20 | void sendIntentSync(in Intent intent); 21 | 22 | int sumActivities(); 23 | 24 | IPluginServiceServer fetchServiceServer(); 25 | 26 | /** 27 | * 插件收到广播 28 | * 29 | * @param plugin 插件名称 30 | * @param receiver Receiver 名称 31 | * @param Intent 广播的 Intent 数据 32 | */ 33 | void onReceive(String plugin, String receiver, in Intent intent); 34 | 35 | /** 36 | * dump通过插件化框架启动起来的Service信息 37 | */ 38 | String dumpServices(); 39 | 40 | /** 41 | * dump插件化框架中存储的详细Activity坑位映射表 42 | */ 43 | String dumpActivities(); 44 | } -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/loader2/PluginBinderInfo.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.loader2; 2 | 3 | parcelable PluginBinderInfo; -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/loader2/mgr/IServiceConnection.aidl: -------------------------------------------------------------------------------- 1 | // IServiceConnection.aidl 2 | // Same as android.app.IServiceConnection 3 | package com.qihoo360.loader2.mgr; 4 | 5 | import android.content.ComponentName; 6 | 7 | /** @hide */ 8 | oneway interface IServiceConnection { 9 | void connected(in ComponentName name, IBinder service); 10 | } 11 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/loader2/sp/IPref.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.loader2.sp; 2 | 3 | import android.os.Bundle; 4 | 5 | /** 6 | * @author RePlugin Team 7 | */ 8 | interface IPref { 9 | 10 | String get(String category, String key, String defValue); 11 | 12 | void set(String category, String key, String value); 13 | 14 | Bundle getAll(String category); 15 | } 16 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/mobilesafe/svcmanager/IServiceChannel.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.mobilesafe.svcmanager; 2 | 3 | import com.qihoo360.replugin.IBinderGetter; 4 | 5 | interface IServiceChannel { 6 | 7 | IBinder getService(String serviceName); 8 | 9 | void addService(String serviceName, IBinder service); 10 | 11 | void addServiceDelayed(String serviceName, IBinderGetter getter); 12 | 13 | void removeService(String serviceName); 14 | 15 | IBinder getPluginService(String pluginName, String serviceName, IBinder deathMonitor); 16 | 17 | void onPluginServiceRefReleased(String pluginName, String serviceName); 18 | } -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/replugin/IBinderGetter.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin; 2 | 3 | /** 4 | * Binder的获取器,可用于延迟加载IBinder的情况。 5 | *

6 | * 目前用于: 7 | *

8 | * * RePlugin.registerGlobalBinderDelayed 9 | * 10 | * @author RePlugin Team 11 | */ 12 | interface IBinderGetter { 13 | 14 | /** 15 | * 获取IBinder对象 16 | */ 17 | IBinder get(); 18 | } 19 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/replugin/component/service/server/IPluginServiceServer.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.component.service.server; 2 | 3 | import android.content.ComponentName; 4 | import android.os.Messenger; 5 | 6 | import com.qihoo360.loader2.mgr.IServiceConnection; 7 | 8 | /** 9 | * 负责Server端的服务调度、提供等工作,是服务的提供方,核心类之一 10 | * 11 | * @hide 框架内部使用 12 | * @author RePlugin Team 13 | */ 14 | interface IPluginServiceServer { 15 | ComponentName startService(in Intent intent, in Messenger client); 16 | int stopService(in Intent intent, in Messenger client); 17 | 18 | int bindService(in Intent intent, in IServiceConnection conn, int flags, in Messenger client); 19 | boolean unbindService(in IServiceConnection conn); 20 | 21 | String dump(); 22 | } -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/replugin/model/PluginInfo.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.model; 2 | 3 | parcelable PluginInfo; -------------------------------------------------------------------------------- /replugin-host-library/src/main/aidl/com/qihoo360/replugin/packages/PluginRunningList.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.packages; 2 | 3 | parcelable PluginRunningList; -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/i/IModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.i; 18 | 19 | /** 20 | * 所有可查询的接口都从此interface继承 21 | * 在插件体系中,module是一种略高于interface的概念 22 | * 一个插件可导出一个到多个module,这些module可输出自己业务的各种interface 23 | * 24 | * @author RePlugin Team 25 | * 26 | */ 27 | public interface IModule { 28 | 29 | /** 30 | * 万能接口:当不能升级adapter.jar的时候再考虑使用 31 | * @param args 32 | * @return 33 | */ 34 | Object invoke(Object...args); 35 | } 36 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/i/IPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.i; 18 | 19 | 20 | /** 21 | * 此接口由插件负责导出 22 | * 表示一个具体的物理上的插件实体,例如barcode.jar 23 | * 具体导出细节可看Factory 24 | * 25 | * @author RePlugin Team 26 | * 27 | */ 28 | public interface IPlugin { 29 | 30 | /** 31 | * @param c 需要查询的interface的类 32 | * @return 33 | */ 34 | IModule query(Class c); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/loader2/ProcessStates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.loader2; 18 | 19 | /** 20 | * 保存自定义进程中,每个进程里的坑位信息 21 | * 22 | * @author RePlugin Team 23 | */ 24 | 25 | class ProcessStates { 26 | 27 | /** 28 | * 保存非默认 TaskAffinity 下,坑位的状态信息。 29 | */ 30 | TaskAffinityStates mTaskAffinityStates = new TaskAffinityStates(); 31 | 32 | /** 33 | * 保存默认 TaskAffinity 下,坑位的状态信息。 34 | */ 35 | LaunchModeStates mLaunchModeStates = new LaunchModeStates(); 36 | } 37 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/mobilesafe/api/AppVar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.mobilesafe.api; 18 | 19 | import android.content.Context; 20 | 21 | /** 22 | * @author RePlugin Team 23 | */ 24 | public class AppVar { 25 | 26 | /** 27 | * API模块内部使用,记得初始化 28 | */ 29 | public static Context sAppContext; 30 | } 31 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/mobilesafe/loader/s/DummyService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.mobilesafe.loader.s; 18 | 19 | import android.app.Service; 20 | import android.content.Intent; 21 | import android.os.IBinder; 22 | 23 | /** 24 | * @author RePlugin Team 25 | */ 26 | public class DummyService extends Service { 27 | 28 | @Override 29 | public IBinder onBind(Intent intent) { 30 | return null; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/mobilesafe/parser/manifest/bean/ComponentBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.mobilesafe.parser.manifest.bean; 18 | 19 | import android.content.IntentFilter; 20 | 21 | import java.util.List; 22 | 23 | /** 24 | * @author RePlugin Team 25 | */ 26 | public class ComponentBean { 27 | 28 | public String name; 29 | public List intentFilters; 30 | 31 | @Override 32 | public String toString() { 33 | return String.format("{name:%s, intent-filter.size():%s}", name, intentFilters.size()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/DefaultRePluginCallbacks.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * @deprecated Use RePluginCallbacks instead 7 | * @see RePluginCallbacks 8 | * @author RePlugin Team 9 | */ 10 | 11 | public class DefaultRePluginCallbacks extends RePluginCallbacks { 12 | 13 | /** 14 | * @deprecated Use RePluginCallbacks instead 15 | * @see RePluginCallbacks#RePluginCallbacks(Context) 16 | */ 17 | public DefaultRePluginCallbacks(Context context) { 18 | super(context); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/DefaultRePluginEventCallbacks.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * @deprecated Use RePluginEventCallbacks instead 7 | * @see RePluginEventCallbacks 8 | * @author RePlugin Team 9 | */ 10 | 11 | public class DefaultRePluginEventCallbacks extends RePluginEventCallbacks { 12 | 13 | /** 14 | * @deprecated Use RePluginEventCallbacks instead 15 | * @see RePluginEventCallbacks#RePluginEventCallbacks(Context) 16 | */ 17 | public DefaultRePluginEventCallbacks(Context context) { 18 | super(context); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/IHostBinderFetcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin; 18 | 19 | import android.os.IBinder; 20 | 21 | /** 22 | * 用来实现主程序提供IBinder给其他插件 23 | *

24 | * 插件获取方法:Factory.query("main", "IShare"),返回值:IBinder 25 | *

26 | * TODO 未来会废弃Factory类,并做些调整 27 | * 28 | * @author RePlugin Team 29 | */ 30 | public interface IHostBinderFetcher { 31 | 32 | /** 33 | * 主程序需实现此方法,来返回一个IBinder对象,供插件使用 34 | * 35 | * @param module 模块名 36 | * @return 一个IBinder对象 37 | */ 38 | IBinder query(String module); 39 | } 40 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/compat/LocalBroadcastManager.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.compat; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | 8 | /** 9 | * LocalBroadcastManager 兼容层 10 | * 11 | * @author LQR 12 | * @since 2021/12/8 13 | */ 14 | public abstract class LocalBroadcastManager { 15 | 16 | public static LocalBroadcastManager getInstance(Context context) { 17 | if (CompatConfig.DEPENDENCY_ANDROIDX) { 18 | return new LocalBroadcastManagerAndroidX(context); 19 | } else if (CompatConfig.DEPENDENCY_SUPPORT) { 20 | return new LocalBroadcastManagerSupport(context); 21 | } 22 | return null; 23 | } 24 | 25 | public abstract void registerReceiver(BroadcastReceiver receiver, IntentFilter filter); 26 | 27 | public abstract void unregisterReceiver(BroadcastReceiver receiver); 28 | 29 | public abstract boolean sendBroadcast(Intent intent); 30 | 31 | public abstract void sendBroadcastSync(Intent intent); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/compat/LocalBroadcastManagerSupport.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.compat; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | 8 | /** 9 | * AndroidSupport 的 LocalBroadcastManager 10 | * 11 | * @author LQR 12 | * @since 2021/12/8 13 | */ 14 | public class LocalBroadcastManagerSupport extends LocalBroadcastManager { 15 | 16 | private final android.support.v4.content.LocalBroadcastManager localBroadcastManager; 17 | 18 | public LocalBroadcastManagerSupport(Context context) { 19 | localBroadcastManager = android.support.v4.content.LocalBroadcastManager.getInstance(context); 20 | } 21 | 22 | @Override 23 | public void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { 24 | localBroadcastManager.registerReceiver(receiver, filter); 25 | } 26 | 27 | @Override 28 | public void unregisterReceiver(BroadcastReceiver receiver) { 29 | localBroadcastManager.unregisterReceiver(receiver); 30 | } 31 | 32 | @Override 33 | public boolean sendBroadcast(Intent intent) { 34 | return localBroadcastManager.sendBroadcast(intent); 35 | } 36 | 37 | @Override 38 | public void sendBroadcastSync(Intent intent) { 39 | localBroadcastManager.sendBroadcastSync(intent); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderLoader0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderLoader0 extends ProcessPitProviderBase { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderLoader1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderLoader1 extends ProcessPitProviderBase { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderP0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderP0 extends ProcessPitProviderBase { 23 | } 24 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderP1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderP1 extends ProcessPitProviderBase { 23 | } 24 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderP2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderP2 extends ProcessPitProviderBase { 23 | } 24 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/process/ProcessPitProviderUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.process; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class ProcessPitProviderUI extends ProcessPitProviderBase { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/provider/PluginPitProviderP0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.provider; 18 | 19 | /** 20 | * ProcessPitProviderLoader0 21 | * 22 | * @author RePlugin Team 23 | */ 24 | public class PluginPitProviderP0 extends PluginPitProviderBase { 25 | public static final String AUTHORITY = AUTHORITY_PREFIX + "0"; 26 | 27 | public PluginPitProviderP0() { 28 | super(AUTHORITY); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/provider/PluginPitProviderP1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.provider; 18 | 19 | /** 20 | * ProcessPitProviderLoader1 21 | * 22 | * @author RePlugin Team 23 | */ 24 | public class PluginPitProviderP1 extends PluginPitProviderBase { 25 | public static final String AUTHORITY = AUTHORITY_PREFIX + "1"; 26 | 27 | public PluginPitProviderP1() { 28 | super(AUTHORITY); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/provider/PluginPitProviderP2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.provider; 18 | 19 | /** 20 | * ProcessProviderLoader2 21 | * 22 | * @author RePlugin Team 23 | */ 24 | public class PluginPitProviderP2 extends PluginPitProviderBase { 25 | public static final String AUTHORITY = AUTHORITY_PREFIX + "2"; 26 | 27 | public PluginPitProviderP2() { 28 | super(AUTHORITY); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/provider/PluginPitProviderPersist.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.provider; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class PluginPitProviderPersist extends PluginPitProviderBase { 23 | public static final String AUTHORITY = AUTHORITY_PREFIX + "PSP"; 24 | 25 | public PluginPitProviderPersist() { 26 | super(AUTHORITY); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /replugin-host-library/src/main/java/com/qihoo360/replugin/component/provider/PluginPitProviderUI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.component.provider; 18 | 19 | /** 20 | * @author RePlugin Team 21 | */ 22 | public class PluginPitProviderUI extends PluginPitProviderBase { 23 | public static final String AUTHORITY = AUTHORITY_PREFIX + "UIP"; 24 | 25 | public PluginPitProviderUI() { 26 | super(AUTHORITY); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/README.md: -------------------------------------------------------------------------------- 1 | # RePlugin Plugin Gradle 2 | 3 | RePlugin Plugin Gradle是一个Gradle插件,由 **插件** 负责引入。 4 | 5 | 该Gradle插件主要负责在插件的编译期中做一些事情,是“动态编译方案”的主要实现者。此外,开发者可通过修改其属性而做一些自定义的操作。 6 | 7 | 大致包括: 8 | 9 | * 动态修改主要调用代码,改为调用RePlugin Plugin Gradle(如Activity的继承、Provider的重定向等) 10 | 11 | 开发者需要依赖此Gradle插件,以实现对RePlugin的接入。请参见WiKi以了解接入方法。 12 | 13 | 有关RePlugin Host Gradle的详细描述,请访问我们的WiKi,以了解更多的内容。 14 | (文档正在完善,请耐心等待) -------------------------------------------------------------------------------- /replugin-plugin-gradle/config.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | * 16 | */ 17 | 18 | ext { 19 | config = this.&readConfig() 20 | } 21 | 22 | def readConfig() { 23 | Properties configProperties = new Properties() 24 | file('config.properties').withInputStream { 25 | configProperties.load(it) 26 | } 27 | configProperties 28 | } 29 | 30 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/config.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | # 17 | 18 | repoUrl = 19 | 20 | groupId = com.qihoo360.replugin 21 | artifactId = replugin-plugin-gradle 22 | 23 | # --- android config --- 24 | compileSdkVersion = 21 25 | buildToolsVersion = 23.0.3 26 | minSdkVersion = 10 27 | targetSdkVersion = 21 28 | 29 | # --- user info --- 30 | # 注意:1、仅研发一组同事能修改此URL; 31 | # 2、切勿去除,以免误上传到Maven中心库,引发代码泄露危机。 32 | username = 33 | password = 34 | 35 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-plugin-gradle/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /replugin-plugin-gradle/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | # 17 | 18 | #Mon Dec 28 10:00:20 PST 2015 19 | distributionBase=GRADLE_USER_HOME 20 | distributionPath=wrapper/dists 21 | zipStoreBase=GRADLE_USER_HOME 22 | zipStorePath=wrapper/dists 23 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 24 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/src/main/groovy/com/qihoo360/replugin/gradle/plugin/injector/BaseInjector.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | * 16 | */ 17 | 18 | package com.qihoo360.replugin.gradle.plugin.injector 19 | 20 | import org.gradle.api.Project 21 | 22 | /** 23 | * @author RePlugin Team 24 | */ 25 | public abstract class BaseInjector implements IClassInjector { 26 | 27 | protected Project project 28 | 29 | protected String variantDir 30 | 31 | @Override 32 | public Object name() { 33 | return getClass().getSimpleName() 34 | } 35 | 36 | public void setProject(Project project) { 37 | this.project = project; 38 | } 39 | 40 | public void setVariantDir(String variantDir) { 41 | this.variantDir = variantDir; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/src/main/groovy/com/qihoo360/replugin/gradle/plugin/manifest/IManifest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | * 16 | */ 17 | 18 | package com.qihoo360.replugin.gradle.plugin.manifest; 19 | 20 | /** 21 | * @author RePlugin Team 22 | */ 23 | public interface IManifest { 24 | 25 | /** 26 | * 获取 AndroidManifest 中声明的所有 Activity 27 | */ 28 | List getActivities() 29 | 30 | /** 31 | * 应用程序包名 32 | */ 33 | String getPackageName() 34 | } 35 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/src/main/groovy/com/qihoo360/replugin/gradle/plugin/util/FileUtil.groovy: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.gradle.plugin.util; 2 | 3 | /** 4 | * 文件工具类 5 | * @author LQR* 6 | * @since 2022/9/25 7 | */ 8 | class FileUtil { 9 | 10 | /** 11 | * 获取文件夹下所有文件 12 | * @param dir 文件夹 13 | * @param targetList 存放文件的列表 14 | */ 15 | static void getFileListDeep(File dir, List targetList) { 16 | def files = dir.listFiles() 17 | for (File file : files) { 18 | if (file.isDirectory()) { 19 | getFileListDeep(file, targetList) 20 | } else { 21 | targetList.add(file) 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /replugin-plugin-gradle/src/main/resources/META-INF/gradle-plugins/replugin-plugin-gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | # 17 | 18 | implementation-class=com.qihoo360.replugin.gradle.plugin.ReClassPlugin -------------------------------------------------------------------------------- /replugin-plugin-library/replugin-library-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in ./sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -keep class com.qihoo360.replugin.Entry { *; } 27 | -------------------------------------------------------------------------------- /replugin-plugin-library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /replugin-plugin-library/src/main/aidl/com/qihoo360/loader2/IPlugin.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.loader2; 2 | 3 | /** 4 | * @author RePlugin Team 5 | */ 6 | interface IPlugin { 7 | 8 | IBinder query(String name); 9 | } 10 | -------------------------------------------------------------------------------- /replugin-plugin-library/src/main/aidl/com/qihoo360/replugin/IBinderGetter.aidl: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin; 2 | 3 | /** 4 | * Binder的获取器,可用于延迟加载IBinder的情况。 5 | *

6 | * 目前用于: 7 | *

8 | * * RePlugin.registerGlobalBinderDelayed 9 | * 10 | * @author RePlugin Team 11 | */ 12 | interface IBinderGetter { 13 | 14 | /** 15 | * 获取IBinder对象 16 | */ 17 | IBinder get(); 18 | } 19 | -------------------------------------------------------------------------------- /replugin-plugin-library/src/main/java/com/qihoo360/replugin/compat/CompatConfig.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.compat; 2 | 3 | /** 4 | * 兼容层配置 5 | * 6 | * @author LQR 7 | * @since 2021/12/8 8 | */ 9 | public final class CompatConfig { 10 | 11 | private static volatile CompatConfig sInstance; 12 | 13 | public static final boolean DEPENDENCY_ANDROIDX; 14 | public static final boolean DEPENDENCY_SUPPORT; 15 | 16 | static { 17 | DEPENDENCY_ANDROIDX = findClassByClassName("androidx.fragment.app.FragmentActivity"); 18 | DEPENDENCY_SUPPORT = findClassByClassName("android.support.v4.app.FragmentActivity"); 19 | } 20 | 21 | private CompatConfig() { 22 | } 23 | 24 | public static CompatConfig getInstance() { 25 | if (sInstance == null) { 26 | synchronized (CompatConfig.class) { 27 | if (sInstance == null) { 28 | sInstance = new CompatConfig(); 29 | } 30 | } 31 | } 32 | return sInstance; 33 | } 34 | 35 | private static boolean findClassByClassName(String className) { 36 | boolean hasDependency; 37 | try { 38 | Class.forName(className); 39 | hasDependency = true; 40 | } catch (ClassNotFoundException e) { 41 | hasDependency = false; 42 | } 43 | return hasDependency; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /replugin-plugin-library/src/main/java/com/qihoo360/replugin/i/IPluginManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.i; 18 | 19 | 20 | /** 21 | * 负责插件和插件之间的interface互通,可通过插件Entry得到,也可通过wrapper类Factory直接调用 22 | * 23 | * @author RePlugin Team 24 | */ 25 | public interface IPluginManager { 26 | 27 | /** 28 | * 自动分配插件进程 29 | */ 30 | int PROCESS_AUTO = Integer.MIN_VALUE; 31 | 32 | /** 33 | * UI进程 34 | */ 35 | int PROCESS_UI = -1; 36 | 37 | /** 38 | * 常驻进程 39 | */ 40 | int PROCESS_PERSIST = -2; 41 | } 42 | -------------------------------------------------------------------------------- /replugin-sample-extra/README.md: -------------------------------------------------------------------------------- 1 | # replugin-sample-extra 中是一些更高级的示例 2 | 3 | 其中,replugin-sample-extra/fresco 是对 Fresco 的使用,实现了宿主和插件公用一份Fresco代码。 4 | 5 | FrescoHost是宿主代码,FrescoPlugin是插件代码。 6 | -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/.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 | -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/armeabi/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/armeabi/libimagepipeline.so -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/drawee-modified-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/drawee-modified-1.7.1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/fbcore-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/fbcore-1.7.1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/fresco-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/fresco-1.7.1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-1.7.1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-base-1.7.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-base-1.7.1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/src/main/assets/plugins/plugin1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GitLqr/RePluginX/744bedf6c8e89849a2cb42da9a24e93b22a5faf0/replugin-sample-extra/fresco/FrescoHost/app/src/main/assets/plugins/plugin1.jar -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/src/main/res/layout/activity_host_fresco.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /replugin-sample-extra/fresco/FrescoHost/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 |