maven 中混淆代码不支持-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*


我用proguard-maven-plugin插件在android打包时混淆代码,在加入-optimizations !code/simplification/arithmetic,!field/ ,!class/merging/ 后报错,把这个注掉不报错,怎么修改才能让加入这个不报错呢。错误是:

   
  [proguard] Error: Unknown option '-optimizations' in line 8 of file 'F:\workspace\TestMaven\proguard.cfg',
 

proguard.cfg:

   
  -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose

-keep public class * extends android.app.Activity

Android maven

OkamiC 12 years, 2 months ago

在文件project.properties中少加了proguard.config=proguard.cfg这句话吧

boysama answered 12 years, 2 months ago

Your Answer