[ https://issues.apache.org/jira/browse/CB-9708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013163#comment-15013163 ]
feiyun0112 edited comment on CB-9708 at 11/19/15 8:48 AM: ---------------------------------------------------------- cordova use gradle to bulid android project, so you need to modify "platforms\android\build.gradle" add this part: buildTypes { release { minifyEnabled true proguardFile getDefaultProguardFile('proguard-android.txt') } } more detail see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard was (Author: feiyun0112): cordova use gradle to bulid android project, so you need to modify "platforms\android\build.gradle" add this part: buildTypes { release { minifyEnabled true proguardFile getDefaultProguardFile('proguard-android.txt') } } more detail see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard > Enabling ProGuard for cordova android project doesn't work > ---------------------------------------------------------- > > Key: CB-9708 > URL: https://issues.apache.org/jira/browse/CB-9708 > Project: Apache Cordova > Issue Type: Bug > Affects Versions: 5.3.2 > Environment: Windows 10 Enterprise > CLI 5.3.3 > Reporter: Diego Geffner > > I found a few sites on the internet like this: > http://stackoverflow.com/questions/27310268/how-to-use-proguard-in-cordova-android-app > that said that modifying the file: project.properties would enable proguard. > I tried this, and then did a "cordova build android --release" but proguard > wasn't getting run. > If this is not a feature that you actually support, it would be nice if you > added a way to run proguard on the cordova builds. > This is the file I'm talking about: > # This file is automatically generated by Android Tools. > # Do not modify this file -- YOUR CHANGES WILL BE ERASED! > # > # This file must be checked in Version Control Systems. > # > # To customize properties used by the Ant build system edit > # "ant.properties", and override values to adapt the script to your > # project structure. > # > # To enable ProGuard to shrink and obfuscate your code, uncomment this > (available properties: sdk.dir, user.home): > #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt > # Project target. > target=android-22 > android.library.reference.1=CordovaLib -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org