Search Unity

[User Proguard File] option with Cloud Build

Discussion in 'Unity Cloud Build' started by kyou_unity, Jun 11, 2019.

  1. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    2
    Hello,
    I have a question about User Proguard File option when I try to build a Unity project for Android.
    When I start build from Unity > File > BuildSetting > Build with

    upload_2019-6-11_15-53-38.png
    It works fine.
    But when I try to build from BuildPipeline/Cloud Build I found that I can't set for Use Proguard File.
    There is a way to set BuildSystem and Minify by

    EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
    EditorUserBuildSettings.androidReleaseMinification = AndroidMinification.Proguard;

    but it seems not enough and cause a build error.
    This opitions are not saved by any settings.asset either.

    How can I build from BuildPipeline or Cloud Build with my own proguard file?

    Thank you
     
    TheChosenBlob likes this.
  2. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    76
  3. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    76
    Supposedly this box gets ticked automatically if you have the proguard-user.txt file in the default path (Assets/Plugins/Android/). That seems to be working for us.
     
  4. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    2
    Yes, just as you said,「Custom Gradle Template」and 「User Proguard File」will be on automatically when Unity detected mainTemplate.gradle and proguard-user.txt file