Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin/Visual Studio 2015: Custom Proguard configuration

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?

like image 381
Morten Frederiksen Avatar asked Dec 20 '15 10:12

Morten Frederiksen


2 Answers

  1. Just put your Proguard.cfg into your Project
  2. Right click on Proguard.cfg > "Build Action" > "ProguardConfiguration"

enter image description here

like image 98
Rofiq Setiawan Avatar answered Nov 15 '22 10:11

Rofiq Setiawan


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)

like image 20
Christo Nel Avatar answered Nov 15 '22 11:11

Christo Nel