Comentários (1)

1 pariraj comentou às Link permanente

After these two step
1) First of all, take compiler.jar file and put it under the directory of your choice. I will create a buildtools\ folder in the root of my project and keep it there.
2) Next, create ObfuscateJS.xml file. It will contain the Ant script to be used for obfuscating JavaScript code. I will keep in in the root of my project.

"Right click on ObfuscateJS.xml > runas > Ant Build to Obfuscate js file".
I added given xml code in ObfuscateJS.xml for successfull Obfuscation.
<project basedir="." default="compile">
<taskdef name="jscomp" classname="" classpath="buildtools/compiler.jar"></taskdef>
<property name="androidWebResourcesFolder" value="${basedir}/apps/TestApp/android/native/assets/www/default"></property>
<target name="compile">
<chmod perm="666">
<fileset dir="${androidWebResourcesFolder}">
<include name="**/*.js"></include>
<jscomp compilationLevel="simple" output="${androidWebResourcesFolder}/js/main.js">
<sources dir="${androidWebResourcesFolder}/js">
<file name="main.js">
Note : please remove " " from the code when you are copying it.