We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
private static void saveModifiedJarForCheck(File optJar) { File dir = DataHelper.ext.pluginTmpDir; File checkJarFile = new File(dir, optJar.getName()); if (checkJarFile.exists()) { checkJarFile.delete(); } FileUtils.copyFile(optJar, checkJarFile); }
请问这段代码,只是用来检查修改的jar包的对吗
The text was updated successfully, but these errors were encountered:
是的,是为了将成功注入的java类或jar包单独输出到build的目录LazierTracker目录下。分析如下:
LazierTracker
private static void saveModifiedJarForCheck(File optJar) { File dir = com.codeless.plugin.utils.DataHelper.ext.pluginTmpDir; File checkJarFile = new File(dir, optJar.getName()); if (checkJarFile.exists()) { checkJarFile.delete(); } FileUtils.copyFile(optJar, checkJarFile); }
从上述saveModifiedJarForCheck函数可知,这些文件被写入的目录为com.codeless.plugin.utils.DataHelper.ext.pluginTmpDir,通过查找,可知这个变量在initDir函数中被赋值。
com.codeless.plugin.utils.DataHelper.ext.pluginTmpDir
从下面的initDir函数可知,pluginTmpDir赋值为project.buildDir/LazierTracker,因此,你会在app/build/LazierTracker目录下找到这些修改后的文件。
pluginTmpDir
static void initDir(Project project) { File pluginTmpDir = new File(project.buildDir, 'LazierTracker') if (!pluginTmpDir.exists()) { pluginTmpDir.mkdir() } com.codeless.plugin.utils.DataHelper.ext.pluginTmpDir = pluginTmpDir }
效果如下:
Sorry, something went wrong.
No branches or pull requests
请问这段代码,只是用来检查修改的jar包的对吗
The text was updated successfully, but these errors were encountered: