-
Notifications
You must be signed in to change notification settings - Fork 1.6k
重定向修改jar #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
247321453
wants to merge
10
commits into
Qihoo360:dev
Choose a base branch
from
247321453:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
重定向修改jar #301
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cce6904
libs的jar重定向修改
58e5a0d
改为json保存修改信息
82142dd
不需要保存jar路径
e27e49d
分buildType
c03c6aa
Activities变化,也需要更新jar
a4c067f
aar的jar都一样处理
d4853cb
不需要反射重定向
c2ca290
代码调整
247321453 0ca937c
fix:repackage
247321453 a49598f
code:reJarPath
247321453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,23 +119,23 @@ public class Util { | |
| boolean needInject = checkNeedInjector(infoMap, jar, reJar, activityMd5, md5); | ||
|
|
||
| //设置重定向jar | ||
| setJarInput(jarInput, reJar) | ||
| // setJarInput(jarInput, reJar) | ||
| //ReClassTransform.copyJar需要用到 | ||
| map.put(jar.getAbsolutePath(), jarPath) | ||
| if (needInject) { | ||
| /* 将 jar 包解压,并将解压后的目录加入 classpath */ | ||
| // println ">>> 解压Jar${jarPath}" | ||
| String jarZipDir = reJar.getParent() + File.separatorChar + reJar.getName().replace('.jar', '') | ||
| if (unzip(jar.getAbsolutePath(), jarZipDir)) { | ||
|
|
||
| includeJars << jarPath | ||
| includeJars << jar.getAbsolutePath() | ||
|
||
| classPath << jarZipDir | ||
| //保存修改的插件版本号 | ||
| needSave = true | ||
| infoMap.put(jar.getAbsolutePath(), new JarPatchInfo(jar, activityMd5)) | ||
|
|
||
| visitor.setBaseDir(jarZipDir) | ||
| Files.walkFileTree(Paths.get(jarZipDir), visitor) | ||
|
|
||
| map.put(jarPath, jarPath) | ||
| } | ||
| // 删除 jar | ||
| if (reJar.exists()) { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无用的import和方法,变量声明等,请移除