Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Set Custom Proguard File via script? Automated workflow?

Discussion in 'Android' started by Xarbrough, Jul 27, 2021.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I recently discovered (by lots of errors and pain) that even the Google Unity Plugin will be stripped if release minification is enabled in the project settings. I would have thought that Google handles this via some custom process of including proguard files that define classes that shouldn't be stripped. Turns out, I needed to enabled the "Custom Proguard File" setting in the Project Settings and then manually copy and paste Google's proguard templates into the single proguard-user.txt file to make minify work correctly.

    Is is possible to set the custom proguard file via script? I'd like to set this all up in our custom build process without user intervention. Also, if I could do it, then Google could probably do it and I could open a request on their Github. ^^