MobileFirst 和 Proguard
MobileFirst and Proguard
我想了解是否可以在使用 IBM MobileFirst 7.1 开发的 混合 应用程序 (Android) 中激活 Proguard 混淆,或者 Proguards 仅适用于本机应用程序在 IBM MobileFirst 库中 ?
提前致谢。
是的。您可以将 ProGuard 与混合应用程序一起用于 Android 环境。
在此处阅读更多内容:
You can obfuscation your web resource by google compiler see the below link.
[https://www.ibm.com/developerworks/community/blogs/worklight/entry/obfuscating_javascript_code?lang=en][1]
In the comment section of this link, you will find ANT script for that.
要遵循的步骤:
1) 下载 "Google closure compiler" 并将其放在您的项目根目录中。
2) 制作一个 ANT 文件 ObfuscateJS.xml。在classpath中如果是folder则放jar的路径path_of_jar处放文件夹名。在 属性 标签中输入您的项目名称。您可以在此处的 jscomp 标签中添加多个文件。
<?xml version="1.0"?>
<chmod perm="666">
<fileset dir="${androidWebResourcesFolder}">
<include name="**/*.js"></include>
</fileset>
</chmod>
<jscomp compilationLevel="simple" output="${androidWebResourcesFolder}/js/xyz.js">
<sources dir="${androidWebResourcesFolder}/js">
<file name="workflow.js">
</file>
</sources>
</jscomp>
<jscomp compilationLevel="simple" output="${androidWebResourcesFolder}/js/index.js">
<sources dir="${androidWebResourcesFolder}/js">
<file name="index.js">
</file>
</sources>
</jscomp>
</target>
3) 右键单击 ObfuscateJS.xml 并单击 ANT 构建。
我想了解是否可以在使用 IBM MobileFirst 7.1 开发的 混合 应用程序 (Android) 中激活 Proguard 混淆,或者 Proguards 仅适用于本机应用程序在 IBM MobileFirst 库中 ?
提前致谢。
是的。您可以将 ProGuard 与混合应用程序一起用于 Android 环境。
在此处阅读更多内容:
You can obfuscation your web resource by google compiler see the below link.
[https://www.ibm.com/developerworks/community/blogs/worklight/entry/obfuscating_javascript_code?lang=en][1]
In the comment section of this link, you will find ANT script for that.
要遵循的步骤: 1) 下载 "Google closure compiler" 并将其放在您的项目根目录中。 2) 制作一个 ANT 文件 ObfuscateJS.xml。在classpath中如果是folder则放jar的路径path_of_jar处放文件夹名。在 属性 标签中输入您的项目名称。您可以在此处的 jscomp 标签中添加多个文件。
<?xml version="1.0"?>
<chmod perm="666">
<fileset dir="${androidWebResourcesFolder}">
<include name="**/*.js"></include>
</fileset>
</chmod>
<jscomp compilationLevel="simple" output="${androidWebResourcesFolder}/js/xyz.js">
<sources dir="${androidWebResourcesFolder}/js">
<file name="workflow.js">
</file>
</sources>
</jscomp>
<jscomp compilationLevel="simple" output="${androidWebResourcesFolder}/js/index.js">
<sources dir="${androidWebResourcesFolder}/js">
<file name="index.js">
</file>
</sources>
</jscomp>
</target>
3) 右键单击 ObfuscateJS.xml 并单击 ANT 构建。