Xamarin/Visual Studio 2015: Custom Proguard config

2019-06-20 04:48发布

I need to make a customized Proguard configuration. However I cannot find out how to do that. When building a new configuration file is copied into the /obj/release/proguard folder. How can this configuration file be customized?

2条回答
聊天终结者
2楼-- · 2019-06-20 05:21
  1. Just put your Proguard.cfg into your Project
  2. Right click on Proguard.cfg > "Build Action" > "ProguardConfiguration"

enter image description here

查看更多
聊天终结者
3楼-- · 2019-06-20 05:22

The above answer is 100% correct on how to add the file. To make sure you file gets picked up you can check the output logs, it will contain something like this:

ProguardConfigurationFiles:
      {sdk.dir}tools\proguard\proguard-android.txt;
      {intermediate.common.xamarin};
      {intermediate.references};
      {intermediate.application};
         Proguard.cfg;

NOTE: Make sure that you set your MSBuild output verbosity to Detailed for this (Tools > Options > Build and Run)

查看更多
登录 后发表回答