Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
hyongbai committed Mar 28, 2019
2 parents 00ffa38 + 9c2168d commit 312646b
Show file tree
Hide file tree
Showing 20 changed files with 326 additions and 294 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
</p>

[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/Qihoo360/RePlugin/blob/master/LICENSE)
[![Release Version](https://img.shields.io/badge/release-2.3.1-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases)
[![Release Version](https://img.shields.io/badge/release-2.3.2-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases)

## 活动通知
移动技术最新活动通知:9月1号360移动技术开放日 http://t.cn/RDiNru9
## 通知

**360开源又一力作——[ArgusAPM移动性能监控平台](https://github.com/Qihoo360/ArgusAPM)**

[ArgusAPM](https://github.com/Qihoo360/ArgusAPM)是360手机卫士客户端团队继RePlugin之后开源的又一个重量级开源项目。ArgusAPM是360移动端产品使用的可视化性能监控平台,为移动端APP提供性能监控与管理,可以迅速发现和定位各类APP性能和使用问题,帮助APP不断的提升用户体验。


**360移动技术最新活动通知:**

2018年12月16日,360移动性能开放日邀您参加,届时将会有360、美团技术大牛为大家分享Android、iOS性能监控实践。
欢迎报名参加,戳戳戳!!!-->https://mp.weixin.qq.com/s/-7DCnXI_EBMBwYG_PUuUDg

## RePlugin —— A flexible, stable, easy-to-use Android Plug-in Framework

Expand Down
12 changes: 11 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@

[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/Qihoo360/RePlugin/blob/master/LICENSE)

[![Release Version](https://img.shields.io/badge/release-2.3.1-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases)
[![Release Version](https://img.shields.io/badge/release-2.3.2-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases)

## 通知

**360开源又一力作——[ArgusAPM移动性能监控平台](https://github.com/Qihoo360/ArgusAPM)**

[ArgusAPM](https://github.com/Qihoo360/ArgusAPM)是360手机卫士客户端团队继RePlugin之后开源的又一个重量级开源项目。ArgusAPM是360移动端产品使用的可视化性能监控平台,为移动端APP提供性能监控与管理,可以迅速发现和定位各类APP性能和使用问题,帮助APP不断的提升用户体验。


**360移动技术最新活动通知:**

2018年12月16日,360移动性能开放日邀您参加,届时将会有360、美团技术大牛为大家分享Android、iOS性能监控实践。
欢迎报名参加,戳戳戳!!!-->https://mp.weixin.qq.com/s/-7DCnXI_EBMBwYG_PUuUDg

## RePlugin —— 历经三年多考验,数亿设备使用的,稳定占坑类插件化方案

Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __gradle_exec(){ if [[ -x gradlew ]];then ./gradlew ${@}; else gradle ${@}; fi;
__rp_deploy_project(){
[[ ! -d ${1} ]] && echo ">>> INVALID ${1}!!! <<<" && return
# execute deploying
echo ">>> ${1} <<<" && __gradle_exec -p ${1} clean bintrayUpload
echo ">>> ${1} <<<" && cd ${1} && __gradle_exec -p ${1} clean bintrayUpload
# revert changed files
git checkout ${1}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public class Replugin implements Plugin<Project> {
generateHostConfigTask.group = AppConstant.TASKS_GROUP

//depends on build config task
String generateBuildConfigTaskName = variant.getVariantData().getScope().getGenerateBuildConfigTask().name
def generateBuildConfigTask = project.tasks.getByName(generateBuildConfigTaskName)
def generateBuildConfigTask = variant.getGenerateBuildConfig()
if (generateBuildConfigTask) {
generateHostConfigTask.dependsOn generateBuildConfigTask
generateBuildConfigTask.finalizedBy generateHostConfigTask
Expand All @@ -89,8 +88,7 @@ public class Replugin implements Plugin<Project> {
generateBuiltinJsonTask.group = AppConstant.TASKS_GROUP

//depends on mergeAssets Task
String mergeAssetsTaskName = variant.getVariantData().getScope().getMergeAssetsTask().name
def mergeAssetsTask = project.tasks.getByName(mergeAssetsTaskName)
def mergeAssetsTask = variant.getMergeAssets()
if (mergeAssetsTask) {
generateBuiltinJsonTask.dependsOn mergeAssetsTask
mergeAssetsTask.finalizedBy generateBuiltinJsonTask
Expand Down Expand Up @@ -151,10 +149,8 @@ public class Replugin implements Plugin<Project> {
}
showPluginsTask.group = AppConstant.TASKS_GROUP

//get mergeAssetsTask name
String mergeAssetsTaskName = variant.getVariantData().getScope().getMergeAssetsTask().name
//get real gradle task
def mergeAssetsTask = project.tasks.getByName(mergeAssetsTaskName)
//get mergeAssetsTask name, get real gradle task
def mergeAssetsTask = variant.getMergeAssets()

//depend on mergeAssetsTask so that assets have been merged
if (mergeAssetsTask) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ public class PluginBuiltinJsonCreator implements IFileCreator {
def PluginBuiltinJsonCreator(def project, def variant, def cfg) {
this.config = cfg
this.variant = variant
//make sure processResources Task execute after mergeAssets Task
String mergeAssetsTaskName = variant.getVariantData().getScope().getMergeAssetsTask().name
//get real gradle task
def mergeAssetsTask = project.tasks.getByName(mergeAssetsTaskName)
fileDir = mergeAssetsTask.outputDir
//make sure processResources Task execute after mergeAssets Task, get real gradle task
fileDir = variant.getMergeAssets()?.outputDir
fileName = config.builtInJsonFileName
}

Expand All @@ -56,7 +53,7 @@ public class PluginBuiltinJsonCreator implements IFileCreator {
@Override
String getFileContent() {
//查找插件文件并抽取信息,如果没有就直接返回null
File pluginDirFile = new File(fileDir.getAbsolutePath() + File.separator + config.pluginDir)
File pluginDirFile = new File(fileDir?.getAbsolutePath() + File.separator + config.pluginDir)
if (!pluginDirFile.exists()) {
println "${AppConstant.TAG} The ${pluginDirFile.absolutePath} does not exist "
println "${AppConstant.TAG} pluginsInfo=null"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.qihoo360.replugin.helper.LogDebug.LOG;
import static com.qihoo360.replugin.helper.LogDebug.PLUGIN_TAG;
import static com.qihoo360.replugin.helper.LogRelease.LOGR;

/**
* @author RePlugin Team
* dec: 坑位进程管理 buyuntao
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ final PluginInfo updateV5FileTo(Context context, File dir, boolean checkOverride
if (target.exists()) {
FileUtils.forceDelete(target);
}

// 更名
FileUtils.moveFile(tmpfile, target);
return pi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import android.content.SharedPreferences;

import com.qihoo360.loader2.PluginContext;
import com.qihoo360.replugin.utils.pkg.PackageFilesUtil;
import com.qihoo360.replugin.model.PluginInfo;
import com.qihoo360.replugin.utils.pkg.PackageFilesUtil;

import java.io.InputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public RePluginConfig setMoveFileWhenInstalling(boolean moveFileWhenInstalling)
* 获取宿主的 BuildID
*
* @return 宿主的BuildID
* @since 2.2.2
* @since 2.0.0
*/
public String getHostBuildID() {
return hostBuildID;
Expand All @@ -220,7 +220,7 @@ public String getHostBuildID() {
*
* @param buildID 宿主的BuildID
* @return RePluginConfig自己。这样可以连环调用set方法
* @since 2.2.2
* @since 2.0.0
*/
public RePluginConfig setHostBuild(String buildID) {
if (!checkAllowModify()) {
Expand All @@ -233,7 +233,7 @@ public RePluginConfig setHostBuild(String buildID) {
/**
* 获取宿主的 VersionName
*
* @since 2.2.2
* @since 2.0.0
*/
public String getHostVersionName() {
return hostVersionName;
Expand All @@ -244,7 +244,7 @@ public String getHostVersionName() {
*
* @param versionName 宿主的VersionName
* @return RePluginConfig自己。这样可以连环调用set方法
* @since 2.2.2
* @since 2.0.0
*/
public RePluginConfig setHostVersionName(String versionName) {
if (!checkAllowModify()) {
Expand All @@ -258,7 +258,6 @@ public RePluginConfig setHostVersionName(String versionName) {
* 获取宿主的VersionBuild号
*
* @return
* @since 2.2.2
*/
public String getHostVersionBuild() {
return RePlugin.getConfig().getHostVersionName() + "." + RePlugin.getConfig().getHostBuildID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Cursor query(Context c, Uri uri, String[] projection, String selec
* 调用插件里的Provider
* @see android.content.ContentResolver#query(Uri, String[], String, String[], String, CancellationSignal)
*/
@TargetApi(16)
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public static Cursor query(Context c, Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal) {
Uri turi = toCalledUri(c, uri);
return c.getContentResolver().query(turi, projection, selection, selectionArgs, sortOrder, cancellationSignal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,5 @@ public static int printPluginInfo(PluginInfo pi, int load) {
*/
public static final String MISC_TAG = "ws002";

/**
* createClassLoader TAG
*/
public static final String LOADER_TAG = "createClassLoader";
}
Loading

0 comments on commit 312646b

Please sign in to comment.