Search Unity

Adding proguard support for Unity package

Discussion in 'Scripting' started by samuelstow, Sep 13, 2019.

  1. samuelstow

    samuelstow

    Joined:
    Mar 15, 2019
    Posts:
    6
    Hi,

    I want to add proguard support for our unity package. Currently the only known way we have is for users to add their own custom proguard file and in that file add the classes that our Unity package needs to be public in order for it to function correctly.

    We have an Android library that contains a project.properties, AndroidManifest.xml, and a jar file. I've tried adding a proguard.config entry into the project.properties and adding the proguard-project.txt file that I reference in there. But this doesn't seem to have the desired effect.

    Am I missing something? How should I achieve this? I'm aware that one option maybe to use an aar package, however we also have a script that modifies the AndroidManifest.xml of the Android library at build time which I think would not work with an aar. Possibly this could be updated to update the main AndroidManifest.xml? But If we can achieve without updating to an aar that would be simpler.

    Cheers

    Sam
     
    tessellation likes this.
  2. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    Do you have any suggestions since this was first posted?